Remove brackets around variables in a function that used to be
a macro.
This commit is contained in:
parent
d8c85a260f
commit
a10f496636
@ -602,26 +602,26 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
void
|
||||
_mtx_assert(struct mtx *m, int what, const char *file, int line)
|
||||
{
|
||||
switch ((what)) {
|
||||
switch (what) {
|
||||
case MA_OWNED:
|
||||
case MA_OWNED | MA_RECURSED:
|
||||
case MA_OWNED | MA_NOTRECURSED:
|
||||
if (!mtx_owned((m)))
|
||||
if (!mtx_owned(m))
|
||||
panic("mutex %s not owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
if (mtx_recursed((m))) {
|
||||
if (((what) & MA_NOTRECURSED) != 0)
|
||||
m->mtx_description, file, line);
|
||||
if (mtx_recursed(m)) {
|
||||
if ((what & MA_NOTRECURSED) != 0)
|
||||
panic("mutex %s recursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
} else if (((what) & MA_RECURSED) != 0) {
|
||||
m->mtx_description, file, line);
|
||||
} else if ((what & MA_RECURSED) != 0) {
|
||||
panic("mutex %s unrecursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
}
|
||||
break;
|
||||
case MA_NOTOWNED:
|
||||
if (mtx_owned((m)))
|
||||
if (mtx_owned(m))
|
||||
panic("mutex %s owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
break;
|
||||
default:
|
||||
panic("unknown mtx_assert at %s:%d", file, line);
|
||||
|
@ -602,26 +602,26 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
void
|
||||
_mtx_assert(struct mtx *m, int what, const char *file, int line)
|
||||
{
|
||||
switch ((what)) {
|
||||
switch (what) {
|
||||
case MA_OWNED:
|
||||
case MA_OWNED | MA_RECURSED:
|
||||
case MA_OWNED | MA_NOTRECURSED:
|
||||
if (!mtx_owned((m)))
|
||||
if (!mtx_owned(m))
|
||||
panic("mutex %s not owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
if (mtx_recursed((m))) {
|
||||
if (((what) & MA_NOTRECURSED) != 0)
|
||||
m->mtx_description, file, line);
|
||||
if (mtx_recursed(m)) {
|
||||
if ((what & MA_NOTRECURSED) != 0)
|
||||
panic("mutex %s recursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
} else if (((what) & MA_RECURSED) != 0) {
|
||||
m->mtx_description, file, line);
|
||||
} else if ((what & MA_RECURSED) != 0) {
|
||||
panic("mutex %s unrecursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
}
|
||||
break;
|
||||
case MA_NOTOWNED:
|
||||
if (mtx_owned((m)))
|
||||
if (mtx_owned(m))
|
||||
panic("mutex %s owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
break;
|
||||
default:
|
||||
panic("unknown mtx_assert at %s:%d", file, line);
|
||||
|
@ -602,26 +602,26 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line)
|
||||
void
|
||||
_mtx_assert(struct mtx *m, int what, const char *file, int line)
|
||||
{
|
||||
switch ((what)) {
|
||||
switch (what) {
|
||||
case MA_OWNED:
|
||||
case MA_OWNED | MA_RECURSED:
|
||||
case MA_OWNED | MA_NOTRECURSED:
|
||||
if (!mtx_owned((m)))
|
||||
if (!mtx_owned(m))
|
||||
panic("mutex %s not owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
if (mtx_recursed((m))) {
|
||||
if (((what) & MA_NOTRECURSED) != 0)
|
||||
m->mtx_description, file, line);
|
||||
if (mtx_recursed(m)) {
|
||||
if ((what & MA_NOTRECURSED) != 0)
|
||||
panic("mutex %s recursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
} else if (((what) & MA_RECURSED) != 0) {
|
||||
m->mtx_description, file, line);
|
||||
} else if ((what & MA_RECURSED) != 0) {
|
||||
panic("mutex %s unrecursed at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
}
|
||||
break;
|
||||
case MA_NOTOWNED:
|
||||
if (mtx_owned((m)))
|
||||
if (mtx_owned(m))
|
||||
panic("mutex %s owned at %s:%d",
|
||||
(m)->mtx_description, file, line);
|
||||
m->mtx_description, file, line);
|
||||
break;
|
||||
default:
|
||||
panic("unknown mtx_assert at %s:%d", file, line);
|
||||
|
Loading…
Reference in New Issue
Block a user