Lines Matching refs:future
35 static void future_free(future_t *future);
72 void future_ready(future_t *future, void *value) { in future_ready() argument
73 assert(future != NULL); in future_ready()
74 assert(future->ready_can_be_called); in future_ready()
76 future->ready_can_be_called = false; in future_ready()
77 future->result = value; in future_ready()
78 semaphore_post(future->semaphore); in future_ready()
81 void *future_await(future_t *future) { in future_await() argument
82 assert(future != NULL); in future_await()
85 if (future->semaphore) in future_await()
86 semaphore_wait(future->semaphore); in future_await()
88 void *result = future->result; in future_await()
89 future_free(future); in future_await()
93 static void future_free(future_t *future) { in future_free() argument
94 if (!future) in future_free()
97 semaphore_free(future->semaphore); in future_free()
98 osi_free(future); in future_free()