31 pthread_mutex_init(&monitor->
lock, NULL);
32 pthread_cond_init(&monitor->
cond, NULL);
39 pthread_mutex_destroy(&monitor->
lock);
40 pthread_cond_destroy(&monitor->
cond);
52 pthread_mutex_lock(&monitor->
lock);
54 pthread_cond_signal(&monitor->
cond);
55 pthread_mutex_unlock(&monitor->
lock);
61 pthread_mutex_lock(&monitor->
lock);
63 pthread_cond_wait(&monitor->
cond, &monitor->
lock);
65 pthread_mutex_unlock(&monitor->
lock);
static void as_monitor_wait(as_monitor *monitor)
static void as_monitor_init(as_monitor *monitor)
static void as_monitor_destroy(as_monitor *monitor)
static void as_monitor_begin(as_monitor *monitor)
static void as_monitor_notify(as_monitor *monitor)