diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-05-29 09:40:57 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-05-29 09:40:57 +0000 |
commit | e29b09f9c2a060740fc04d2d91e3b8002d4fdeb1 (patch) | |
tree | eca43db4334fd0de3184770434d0e530e247ba6e /sys/sys/rmlock.h | |
parent | 4ae494ac2ce20fd4f360353155ad4db6f66e82a7 (diff) | |
download | FreeBSD-src-e29b09f9c2a060740fc04d2d91e3b8002d4fdeb1.zip FreeBSD-src-e29b09f9c2a060740fc04d2d91e3b8002d4fdeb1.tar.gz |
Reduce vertical whitespace and other minor style tweaks.
Remove unused rm_initialized() macro.
Diffstat (limited to 'sys/sys/rmlock.h')
-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_ */ |