diff --git a/sys/cddl/compat/opensolaris/sys/rwlock.h b/sys/cddl/compat/opensolaris/sys/rwlock.h index 372413697907..d9233e392548 100644 --- a/sys/cddl/compat/opensolaris/sys/rwlock.h +++ b/sys/cddl/compat/opensolaris/sys/rwlock.h @@ -87,8 +87,7 @@ typedef struct sx krwlock_t; #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) -/* TODO: Change to sx_xholder() once it is moved from kern_sx.c to sx.h. */ -#define rw_owner(lock) ((lock)->sx_lock & SX_LOCK_SHARED ? NULL : (struct thread *)SX_OWNER((lock)->sx_lock)) +#define rw_owner(lock) sx_xholder(lock) #endif /* defined(_KERNEL) */