version 1.20, 2008/05/31 13:36:25 |
version 1.21, 2008/05/31 16:25:23 |
Line 83 static const char nodebug[] = "nodebug"; |
|
Line 83 static const char nodebug[] = "nodebug"; |
|
void |
void |
cv_init(kcondvar_t *cv, const char *wmesg) |
cv_init(kcondvar_t *cv, const char *wmesg) |
{ |
{ |
|
#ifdef LOCKDEBUG |
bool dodebug; |
bool dodebug; |
|
|
KASSERT(wmesg != NULL); |
|
|
|
dodebug = LOCKDEBUG_ALLOC(cv, &cv_lockops, |
dodebug = LOCKDEBUG_ALLOC(cv, &cv_lockops, |
(uintptr_t)__builtin_return_address(0)); |
(uintptr_t)__builtin_return_address(0)); |
if (dodebug) { |
if (!dodebug) { |
cv->cv_wmesg = wmesg; |
|
} else { |
|
/* XXX This will break vfs_lockf. */ |
/* XXX This will break vfs_lockf. */ |
cv->cv_wmesg = nodebug; |
wmesg = nodebug; |
} |
} |
|
#endif |
|
KASSERT(wmesg != NULL); |
|
cv->cv_wmesg = wmesg; |
sleepq_init(CV_SLEEPQ(cv)); |
sleepq_init(CV_SLEEPQ(cv)); |
} |
} |
|
|