svn commit: r237072 - head/sys/sys

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Jun 14 15:24:46 UTC 2012


Author: pjd
Date: Thu Jun 14 15:24:45 2012
New Revision: 237072
URL: http://svn.freebsd.org/changeset/base/237072

Log:
  Add FILEDESC_UNLOCK_ASSERT() macro which asserts that the filedesc is not
  being held by the current thread (at least exclusively).
  
  MFC after:	1 month

Modified:
  head/sys/sys/filedesc.h

Modified: head/sys/sys/filedesc.h
==============================================================================
--- head/sys/sys/filedesc.h	Thu Jun 14 15:23:51 2012	(r237071)
+++ head/sys/sys/filedesc.h	Thu Jun 14 15:24:45 2012	(r237072)
@@ -105,6 +105,7 @@ struct filedesc_to_leader {
 					    SX_NOTRECURSED)
 #define	FILEDESC_XLOCK_ASSERT(fdp)	sx_assert(&(fdp)->fd_sx, SX_XLOCKED | \
 					    SX_NOTRECURSED)
+#define	FILEDESC_UNLOCK_ASSERT(fdp)	sx_assert(&(fdp)->fd_sx, SX_UNLOCKED)
 
 struct thread;
 


More information about the svn-src-head mailing list