Commit 8f4ebf0c authored by Max Kellermann's avatar Max Kellermann

notify: added macro NOTIFY_INITIALIZER

With the macro NOTIFY_INITIALIZER, you can statically initialize a notify object.
parent a0272c2d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment