mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Clean up CSTYLEDs
69 CSTYLED BEGINs remain, appx. 30 of which can be removed if cstyle(1) had a useful policy regarding CALL(ARG1, ARG2, ARG3); above 2 lines. As it stands, it spits out *both* sysctl_os.c: 385: continuation line should be indented by 4 spaces sysctl_os.c: 385: indent by spaces instead of tabs which is very cool Another >10 could be fixed by removing "ulong" &al. handling. I don't foresee anyone actually using it intentionally (does it even exist in modern headers? why did it in the first place?). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12993
This commit is contained in:
@@ -57,13 +57,12 @@ typedef struct sx krwlock_t;
|
||||
#define RW_WRITE_HELD(x) (rw_write_held((x)))
|
||||
#define RW_LOCK_HELD(x) (rw_lock_held((x)))
|
||||
#define RW_ISWRITER(x) (rw_iswriter(x))
|
||||
/* BEGIN CSTYLED */
|
||||
#define rw_init(lock, desc, type, arg) do { \
|
||||
const char *_name; \
|
||||
ASSERT((type) == 0 || (type) == RW_DEFAULT); \
|
||||
KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
|
||||
LO_EXPECTED, ("lock %s already initialized", #lock)); \
|
||||
bzero((lock), sizeof(struct sx)); \
|
||||
bzero((lock), sizeof (struct sx)); \
|
||||
for (_name = #lock; *_name != '\0'; _name++) { \
|
||||
if (*_name >= 'a' && *_name <= 'z') \
|
||||
break; \
|
||||
@@ -87,11 +86,10 @@ typedef struct sx krwlock_t;
|
||||
#define rw_tryupgrade(lock) sx_try_upgrade(lock)
|
||||
#define rw_read_held(lock) \
|
||||
((lock)->sx_lock != SX_LOCK_UNLOCKED && \
|
||||
((lock)->sx_lock & SX_LOCK_SHARED))
|
||||
((lock)->sx_lock & SX_LOCK_SHARED))
|
||||
#define rw_write_held(lock) sx_xlocked(lock)
|
||||
#define rw_lock_held(lock) (rw_read_held(lock) || rw_write_held(lock))
|
||||
#define rw_iswriter(lock) sx_xlocked(lock)
|
||||
#define rw_owner(lock) sx_xholder(lock)
|
||||
|
||||
/* END CSTYLED */
|
||||
#endif /* _OPENSOLARIS_SYS_RWLOCK_H_ */
|
||||
|
||||
Reference in New Issue
Block a user