summaryrefslogtreecommitdiff
path: root/libcr_ipc/coroutine_sema.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 17:25:36 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-27 17:25:36 -0600
commite5e15c04bc58c34906e6d7cfcbad68d1a5617563 (patch)
tree580f5fb0fafc7e974c969fc8aae229205c836195 /libcr_ipc/coroutine_sema.h
parent71e1a86a033c380f85dd300d788af63bfef25bab (diff)
wip
Diffstat (limited to 'libcr_ipc/coroutine_sema.h')
-rw-r--r--libcr_ipc/coroutine_sema.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/libcr_ipc/coroutine_sema.h b/libcr_ipc/coroutine_sema.h
deleted file mode 100644
index 57d5855..0000000
--- a/libcr_ipc/coroutine_sema.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* coroutine_sema.h - Simple semaphores for coroutine.{h,c}
- *
- * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com>
- * SPDX-Licence-Identifier: AGPL-3.0-or-later
- */
-
-#ifndef _COROUTINE_SEMA_H_
-#define _COROUTINE_SEMA_H_
-
-/**
- * A cr_sema_t is a fair unbounded[1] counting semaphore.
- *
- * [1]: Well, INT_MAX
- */
-typedef struct sema_t cr_sema_t;
-
-/**
- * Increment the semaphore,
- *
- * @blocks never
- * @yields never
- * @run_in anywhere (coroutine, sighandler)
- */
-void cr_sema_signal(cr_sema_t *sema);
-
-/**
- * Wait until the semaphore is >0, then decrement it.
- *
- * @blocks maybe
- * @yields maybe
- * @may_run_in coroutine
- */
-void cr_sema_wait(cr_sema_t *sema);
-
-#endif /* _COROUTINE_SEMA_H_ */