From ba693877afa23f35d3ed35c8e0cc193fb71b6b81 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 29 May 2009 09:40:57 +0000 Subject: [PATCH] Reduce vertical whitespace and other minor style tweaks. Remove unused rm_initialized() macro. --- sys/sys/rmlock.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h index ab0b5666fb7..9167a1d9788 100644 --- a/sys/sys/rmlock.h +++ b/sys/sys/rmlock.h @@ -33,26 +33,22 @@ #define _SYS_RMLOCK_H_ #include - #include #include #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 before #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_ */