1LIST_EMPTY_CAREFUL(9)             Data Types             LIST_EMPTY_CAREFUL(9)
2
3
4

NAME

6       list_empty_careful - tests whether a list is empty and not being
7       modified
8

SYNOPSIS

10       int list_empty_careful(const struct list_head * head);
11

ARGUMENTS

13       head
14           the list to test
15

DESCRIPTION

17       tests whether a list is empty _and_ checks that no other CPU might be
18       in the process of modifying either member (next or prev)
19

NOTE

21       using list_empty_careful without synchronization can only be safe if
22       the only activity that can happen to the list entry is list_del_init.
23       Eg. it cannot be used if another CPU could re-list_add it.
24
26Kernel Hackers Manual 2.6.         June 2019             LIST_EMPTY_CAREFUL(9)
Impressum