This is for the test suite to reset a flag without broadcasting that it
changed state.
assert(pthread_mutex_unlock(&s->mutex) == 0);
}
+void reset_sync_flag(struct sync_flag *s) {
+ assert(pthread_mutex_lock(&s->mutex) == 0);
+ s->flag = false;
+ assert(pthread_mutex_unlock(&s->mutex) == 0);
+}
+
bool check_sync_flag(struct sync_flag *s) {
bool flag;
assert(pthread_mutex_lock(&s->mutex) == 0);
extern void init_sync_flag(struct sync_flag *s);
extern void set_sync_flag(struct sync_flag *s, bool value);
+extern void reset_sync_flag(struct sync_flag *s);
extern bool check_sync_flag(struct sync_flag *s);
extern bool wait_sync_flag(struct sync_flag *s, int seconds);