Move CRITICAL_ASSERT() macro to systm.h, where the critical(9)
functions are declared.
This commit is contained in:
parent
bae7bccf39
commit
f7d97ffdc0
@ -341,9 +341,6 @@ do { \
|
||||
#define THREAD_LOCKPTR_ASSERT(td, lock)
|
||||
#endif
|
||||
|
||||
#define CRITICAL_ASSERT(td) \
|
||||
KASSERT((td)->td_critnest >= 1, ("Not in critical section"));
|
||||
|
||||
/*
|
||||
* Flags kept in td_flags:
|
||||
* To change these you MUST have the scheduler lock.
|
||||
|
@ -111,6 +111,12 @@ void kassert_panic(const char *fmt, ...);
|
||||
KASSERT(sizeof(var) == sizeof(void *) && \
|
||||
((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg)
|
||||
|
||||
/*
|
||||
* Assert that a thread is in critical(9) section.
|
||||
*/
|
||||
#define CRITICAL_ASSERT(td) \
|
||||
KASSERT((td)->td_critnest >= 1, ("Not in critical section"));
|
||||
|
||||
/*
|
||||
* If we have already panic'd and this is the thread that called
|
||||
* panic(), then don't block on any mutexes but silently succeed.
|
||||
|
Loading…
x
Reference in New Issue
Block a user