notifier: add BLOCKING_INIT_NOTIFIER_HEAD support
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
8853e72502
commit
f41383d998
@ -51,6 +51,14 @@
|
|||||||
#define BLOCKING_NOTIFIER_HEAD(name) \
|
#define BLOCKING_NOTIFIER_HEAD(name) \
|
||||||
struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
|
struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
|
||||||
|
|
||||||
|
#define BLOCKING_INIT_NOTIFIER_HEAD(name) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
nxmutex_init(&(name)->mutex); \
|
||||||
|
(name)->head = NULL; \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Type Definitions
|
* Public Type Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user