diff options
Diffstat (limited to 'src/server/locks.h')
-rw-r--r-- | src/server/locks.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/locks.h b/src/server/locks.h index 5d4367b..43a3943 100644 --- a/src/server/locks.h +++ b/src/server/locks.h @@ -7,11 +7,13 @@ #define spin_init( lock, type ) debug_spin_init( #lock, __FILE__, __LINE__, lock, type) #define spin_lock( lock ) debug_spin_lock( #lock, __FILE__, __LINE__, lock) +#define spin_trylock( lock ) debug_spin_trylock( #lock, __FILE__, __LINE__, lock) #define spin_unlock( lock ) debug_spin_unlock( #lock, __FILE__, __LINE__, lock) #define spin_destroy( lock ) debug_spin_destroy( #lock, __FILE__, __LINE__, lock) int debug_spin_init(const char *name, const char *file, int line, pthread_spinlock_t *lock, int shared); int debug_spin_lock(const char *name, const char *file, int line, pthread_spinlock_t *lock); +int debug_spin_trylock(const char *name, const char *file, int line, pthread_spinlock_t *lock); int debug_spin_unlock(const char *name, const char *file, int line, pthread_spinlock_t *lock); int debug_spin_destroy(const char *name, const char *file, int line, pthread_spinlock_t *lock); @@ -21,6 +23,7 @@ void debug_dump_lock_stats(); #define spin_init( lock, type ) pthread_spin_init(lock, type) #define spin_lock( lock ) pthread_spin_lock(lock) +#define spin_trylock( lock ) pthread_spin_trylock(lock) #define spin_unlock( lock ) pthread_spin_unlock(lock) #define spin_destroy( lock ) pthread_spin_destroy(lock) |