notify: added macro NOTIFY_INITIALIZER
With the macro NOTIFY_INITIALIZER, you can statically initialize a notify object.
This commit is contained in:
parent
a0272c2d61
commit
8f4ebf0caf
@ -27,6 +27,11 @@ typedef struct notify {
|
||||
int pending;
|
||||
} Notify;
|
||||
|
||||
#define NOTIFY_INITIALIZER { \
|
||||
.mutex = PTHREAD_MUTEX_INITIALIZER, \
|
||||
.cond = PTHREAD_COND_INITIALIZER, \
|
||||
}
|
||||
|
||||
void notify_init(struct notify *notify);
|
||||
|
||||
void notify_deinit(struct notify *notify);
|
||||
|
Loading…
Reference in New Issue
Block a user