notify: added macro NOTIFY_INITIALIZER

With the macro NOTIFY_INITIALIZER, you can statically initialize a
notify object.
This commit is contained in:
Max Kellermann 2008-09-24 07:16:59 +02:00
parent a0272c2d61
commit 8f4ebf0caf

View File

@ -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);