Add _mutex_held routine to test if mutex_t * is held.
This commit is contained in:
parent
91b542a3db
commit
4673d87178
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: thread.h,v 1.1 2009/08/07 20:57:55 haad Exp $ */
|
||||
/* $NetBSD: thread.h,v 1.2 2010/05/03 00:31:32 haad Exp $ */
|
||||
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
|
@ -52,6 +52,7 @@ typedef pthread_rwlock_t rwlock_t;
|
|||
#define thr_main() (1)
|
||||
#define _mutex_init(l,f,a) pthread_mutex_init(l,NULL)
|
||||
#define _mutex_destroy(l) pthread_mutex_destroy(l)
|
||||
#define _mutex_held(l) pthread_mutex_held_np(l)
|
||||
#define mutex_lock(l) pthread_mutex_lock(l)
|
||||
#define mutex_trylock(l) pthread_mutex_trylock(l)
|
||||
#define mutex_unlock(l) pthread_mutex_unlock(l)
|
||||
|
|
Loading…
Reference in New Issue