notifier: add BLOCKING_INIT_NOTIFIER_HEAD support

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2023-05-16 17:05:07 +08:00 committed by Xiang Xiao
parent 8853e72502
commit f41383d998

View File

@ -51,6 +51,14 @@
#define BLOCKING_NOTIFIER_HEAD(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
****************************************************************************/