usr/src/lib/libzpool/common/sys/zfs_context.h
changeset 4831 41ec732c6d9f
parent 4543 12bb2876a62e
child 5329 33cb98223b2d
equal deleted inserted replaced
4830:956da15b6610 4831:41ec732c6d9f
   196 
   196 
   197 /*
   197 /*
   198  * Mutexes
   198  * Mutexes
   199  */
   199  */
   200 typedef struct kmutex {
   200 typedef struct kmutex {
   201 	void	*m_owner;
   201 	void		*m_owner;
   202 	mutex_t	m_lock;
   202 	boolean_t	initialized;
       
   203 	mutex_t		m_lock;
   203 } kmutex_t;
   204 } kmutex_t;
   204 
   205 
   205 #define	MUTEX_DEFAULT	USYNC_THREAD
   206 #define	MUTEX_DEFAULT	USYNC_THREAD
   206 #undef MUTEX_HELD
   207 #undef MUTEX_HELD
   207 #define	MUTEX_HELD(m) _mutex_held(&(m)->m_lock)
   208 #define	MUTEX_HELD(m) _mutex_held(&(m)->m_lock)
   226 /*
   227 /*
   227  * RW locks
   228  * RW locks
   228  */
   229  */
   229 typedef struct krwlock {
   230 typedef struct krwlock {
   230 	void		*rw_owner;
   231 	void		*rw_owner;
       
   232 	boolean_t	initialized;
   231 	rwlock_t	rw_lock;
   233 	rwlock_t	rw_lock;
   232 } krwlock_t;
   234 } krwlock_t;
   233 
   235 
   234 typedef int krw_t;
   236 typedef int krw_t;
   235 
   237