mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
FreeBSD: Don't require zeroing new locks before init
This has not shown to be of use enough to justify the inconvenience. Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Allan Jude <allanjude@freebsd.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10449
This commit is contained in:
parent
e08b993396
commit
499dccd69b
@ -39,7 +39,7 @@ typedef struct sx kmutex_t;
|
|||||||
#include <sys/sx.h>
|
#include <sys/sx.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MUTEX_DEFAULT = 6 /* kernel default mutex */
|
MUTEX_DEFAULT = 0 /* kernel default mutex */
|
||||||
} kmutex_type_t;
|
} kmutex_type_t;
|
||||||
|
|
||||||
#define MUTEX_HELD(x) (mutex_owned(x))
|
#define MUTEX_HELD(x) (mutex_owned(x))
|
||||||
@ -53,9 +53,7 @@ typedef enum {
|
|||||||
|
|
||||||
#define mutex_init(lock, desc, type, arg) do { \
|
#define mutex_init(lock, desc, type, arg) do { \
|
||||||
const char *_name; \
|
const char *_name; \
|
||||||
ASSERT((type) == 0 || (type) == MUTEX_DEFAULT); \
|
ASSERT((type) == MUTEX_DEFAULT); \
|
||||||
KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
|
|
||||||
LO_EXPECTED, ("lock %s already initialized", #lock)); \
|
|
||||||
for (_name = #lock; *_name != '\0'; _name++) { \
|
for (_name = #lock; *_name != '\0'; _name++) { \
|
||||||
if (*_name >= 'a' && *_name <= 'z') \
|
if (*_name >= 'a' && *_name <= 'z') \
|
||||||
break; \
|
break; \
|
||||||
|
Loading…
Reference in New Issue
Block a user