diff options
-rw-r--r-- | sys/sys/rmlock.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h index ab0b566..9167a1d 100644 --- a/sys/sys/rmlock.h +++ b/sys/sys/rmlock.h @@ -33,26 +33,22 @@ #define _SYS_RMLOCK_H_ #include <sys/mutex.h> - #include <sys/_lock.h> #include <sys/_rmlock.h> #ifdef _KERNEL - void rm_init(struct rmlock *rm, const char *name, int opts); void rm_destroy(struct rmlock *rm); int rm_wowned(struct rmlock *rm); void rm_sysinit(void *arg); - void _rm_wlock_debug(struct rmlock *rm, const char *file, int line); void _rm_wunlock_debug(struct rmlock *rm, const char *file, int line); void _rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker, - const char *file, int line); + const char *file, int line); void _rm_runlock_debug(struct rmlock *rm, struct rm_priotracker *tracker, - const char *file, int line); - + const char *file, int line); void _rm_wlock(struct rmlock *rm); void _rm_wunlock(struct rmlock *rm); @@ -61,33 +57,25 @@ void _rm_runlock(struct rmlock *rm, struct rm_priotracker *tracker); /* * Public interface for lock operations. - * */ - #ifndef LOCK_DEBUG #error LOCK_DEBUG not defined, include <sys/lock.h> before <sys/rmlock.h> #endif #if LOCK_DEBUG > 0 - #define rm_wlock(rm) _rm_wlock_debug((rm), LOCK_FILE, LOCK_LINE) #define rm_wunlock(rm) _rm_wunlock_debug((rm), LOCK_FILE, LOCK_LINE) #define rm_rlock(rm,tracker) \ _rm_rlock_debug((rm),(tracker), LOCK_FILE, LOCK_LINE ) #define rm_runlock(rm,tracker) \ _rm_runlock_debug((rm), (tracker), LOCK_FILE, LOCK_LINE ) - #else - #define rm_wlock(rm) _rm_wlock((rm)) #define rm_wunlock(rm) _rm_wunlock((rm)) #define rm_rlock(rm,tracker) _rm_rlock((rm),(tracker)) #define rm_runlock(rm,tracker) _rm_runlock((rm), (tracker)) - #endif -#define rm_initialized(rm) lock_initalized(&(rm)->lock_object) - struct rm_args { struct rmlock *ra_rm; const char *ra_desc; @@ -105,6 +93,5 @@ struct rm_args { SYSUNINIT(name##_rm_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ rm_destroy, (rm)) - #endif /* _KERNEL */ #endif /* !_SYS_RMLOCK_H_ */ |