fix uninitialized variable warning in reader locks
This commit is contained in:
parent
f1b2eaf13b
commit
1dce110f63
@ -887,7 +887,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF)
|
|||||||
#ifdef ADAPTIVE_RWLOCKS
|
#ifdef ADAPTIVE_RWLOCKS
|
||||||
int spintries = 0;
|
int spintries = 0;
|
||||||
int i, n;
|
int i, n;
|
||||||
enum { READERS, WRITER } sleep_reason;
|
enum { READERS, WRITER } sleep_reason = READERS;
|
||||||
#endif
|
#endif
|
||||||
uintptr_t x;
|
uintptr_t x;
|
||||||
#ifdef LOCK_PROFILING
|
#ifdef LOCK_PROFILING
|
||||||
|
@ -551,7 +551,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LOCK_FILE_LINE_ARG_DEF)
|
|||||||
#ifdef ADAPTIVE_SX
|
#ifdef ADAPTIVE_SX
|
||||||
volatile struct thread *owner;
|
volatile struct thread *owner;
|
||||||
u_int i, n, spintries = 0;
|
u_int i, n, spintries = 0;
|
||||||
enum { READERS, WRITER } sleep_reason;
|
enum { READERS, WRITER } sleep_reason = READERS;
|
||||||
bool adaptive;
|
bool adaptive;
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOCK_PROFILING
|
#ifdef LOCK_PROFILING
|
||||||
@ -568,7 +568,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LOCK_FILE_LINE_ARG_DEF)
|
|||||||
int64_t all_time = 0;
|
int64_t all_time = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
||||||
uintptr_t state;
|
uintptr_t state = 0;
|
||||||
#endif
|
#endif
|
||||||
int extra_work = 0;
|
int extra_work = 0;
|
||||||
|
|
||||||
@ -944,7 +944,7 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LOCK_FILE_LINE_ARG_DEF)
|
|||||||
int64_t all_time = 0;
|
int64_t all_time = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
||||||
uintptr_t state;
|
uintptr_t state = 0;
|
||||||
#endif
|
#endif
|
||||||
int extra_work = 0;
|
int extra_work = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user