#pragma once #include #include #include "backing.h" #include "wait.h" struct cch_threaded_waits { bool disabled; struct nn_mutex lock; array(struct cch_wait *) active; }; void cch_threaded_waits_init(struct cch_threaded_waits *thw); bool cch_threaded_wait_for_range(struct cch_threaded_waits *thw, struct cch_backing *backing, struct cch_wait *wait); void cch_threaded_waits_signal_anys(struct cch_threaded_waits *thw); void cch_threaded_waits_evaluate(struct cch_threaded_waits *thw, struct cch_backing *backing); void cch_threaded_wait_disable(struct cch_wait *wait); void cch_threaded_wait_enable(struct cch_wait *wait); void cch_threaded_waits_disable_all(struct cch_threaded_waits *thw); void cch_threaded_waits_close(struct cch_threaded_waits *thw);