Userland applications may include queue.h and define INVARIANTS
but not provide a panic(9) implementation. Thus, enable the sanity checks under INVARIANTS only if _KERNEL is also defined. Submitted by: jmallett Approved by: rwatson (mentor)
This commit is contained in:
parent
01231dd04c
commit
d4fd73659c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152708
@ -326,7 +326,7 @@ struct { \
|
||||
* List functions.
|
||||
*/
|
||||
|
||||
#if defined(INVARIANTS) || defined(QUEUE_MACRO_DEBUG)
|
||||
#if (defined(_KERNEL) && defined(INVARIANTS)) || defined(QUEUE_MACRO_DEBUG)
|
||||
#define QMD_LIST_CHECK_HEAD(head, field) do { \
|
||||
if (LIST_FIRST((head)) != NULL && \
|
||||
LIST_FIRST((head))->field.le_prev != \
|
||||
@ -349,7 +349,7 @@ struct { \
|
||||
#define QMD_LIST_CHECK_HEAD(head, field)
|
||||
#define QMD_LIST_CHECK_NEXT(elm, field)
|
||||
#define QMD_LIST_CHECK_PREV(elm, field)
|
||||
#endif /* defined(INVARIANTS) || defined(QUEUE_MACRO_DEBUG) */
|
||||
#endif /* (_KERNEL && INVARIANTS) || QUEUE_MACRO_DEBUG */
|
||||
|
||||
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user