diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index fc4f196b..4d18120a 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -379,20 +379,21 @@ To resume the coroutine from where it was suspended with *cco_yield()*, simply c | | `cco_yield(ret)` | Yield/suspend execution and return ret | | | `cco_await(promise)` | Await/suspend until promise is true | | | `cco_await(promise, ret)` | Await/suspend with ret value | +| | `cco_sleep(long msec)` | Sleep for milliseconds | | | Semaphores: | | -| | `csem` | Semaphore type | -| | `cco_await_sem(sem)` | Await for the semaphore count > 0 | -| | `cco_await_sem(sem, ret)` | Await with ret on the semaphore | -| | `csem_set(sem, long value)` | Set semaphore value | -| | `csem_signal(sem)` | Signal the semaphore | +| | `cco_sem` | Semaphore type | +| | `cco_sem_await(sem)` | Await for the semaphore count > 0 | +| | `cco_sem_await(sem, ret)` | Await with ret on the semaphore | +| cco_sem | `cco_sem_init(long value)` | Set semaphore value | +| | `cco_sem_release(sem)` | Signal the semaphore | | | Timers: | | -| | `ctimer` | Timer type | -| | `cco_await_timer(tm)` | Await for timer to expire | -| | `cco_await_timer(tm, ret)` | Await with ret for timer to expire | -| | `ctimer_start(tm, long msecs)` | Start timer msecs milliseconds | -| | `ctimer_restart(tm)` | Restart timer with same duration | -| `bool` | `ctimer_expired(tm)` | Return true if timer is expired | -| `long` | `ctimer_remaining(tm)` | Return milliseconds remaining | +| | `cco_timer` | Timer type | +| | `cco_timer_await(tm)` | Await for timer to expire | +| | `cco_timer_await(tm, ret)` | Await with ret for timer to expire | +| | `cco_timer_start(tm, long msecs)` | Start timer msecs milliseconds | +| | `cco_timer_restart(tm)` | Restart timer with same duration | +| `bool` | `cco_timer_expired(tm)` | Return true if timer is expired | +| `long` | `cco_timer_remaining(tm)` | Return milliseconds remaining | | | From caller side: | | | `void` | `cco_stop(co)` | Next call of coroutine returns `cco_end()` | | `void` | `cco_reset(co)` | Reset state to initial (for reuse) | |
