|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
C11 <threads.h> on top of the pthread shim (stk_c_pthread.cpp). Uses only the public C interface of the shim (pthread.h / time.h), no STK API. More...
Go to the source code of this file.
Functions | |
| int | thrd_create (thrd_t *thr, thrd_start_t func, void *arg) |
| int | thrd_equal (thrd_t lhs, thrd_t rhs) |
| thrd_t | thrd_current (void) |
| int | thrd_sleep (const struct timespec *duration, struct timespec *remaining) |
| void | thrd_yield (void) |
| void | thrd_exit (int res) |
| int | thrd_detach (thrd_t thr) |
| int | thrd_join (thrd_t thr, int *res) |
| int | mtx_init (mtx_t *mtx, int type) |
| int | mtx_lock (mtx_t *mtx) |
| int | mtx_timedlock (mtx_t *mtx, const struct timespec *ts) |
| int | mtx_trylock (mtx_t *mtx) |
| int | mtx_unlock (mtx_t *mtx) |
| void | mtx_destroy (mtx_t *mtx) |
| int | cnd_init (cnd_t *cond) |
| int | cnd_signal (cnd_t *cond) |
| int | cnd_broadcast (cnd_t *cond) |
| int | cnd_wait (cnd_t *cond, mtx_t *mtx) |
| int | cnd_timedwait (cnd_t *cond, mtx_t *mtx, const struct timespec *ts) |
| void | cnd_destroy (cnd_t *cond) |
| int | tss_create (tss_t *key, tss_dtor_t dtor) |
| void * | tss_get (tss_t key) |
| int | tss_set (tss_t key, void *val) |
| void | tss_delete (tss_t key) |
| void | call_once (once_flag *flag, void(*func)(void)) |
C11 <threads.h> on top of the pthread shim (stk_c_pthread.cpp). Uses only the public C interface of the shim (pthread.h / time.h), no STK API.
Definition in file stk_c_threads.cpp.
| void call_once | ( | once_flag * | flag, |
| void(* | func )(void) ) |
Definition at line 230 of file stk_c_threads.cpp.
References pthread_once().
| int cnd_broadcast | ( | cnd_t * | cond | ) |
Definition at line 217 of file stk_c_threads.cpp.
References pthread_cond_broadcast().
| void cnd_destroy | ( | cnd_t * | cond | ) |
Definition at line 223 of file stk_c_threads.cpp.
References pthread_cond_destroy().
| int cnd_init | ( | cnd_t * | cond | ) |
Definition at line 215 of file stk_c_threads.cpp.
References pthread_cond_init().
| int cnd_signal | ( | cnd_t * | cond | ) |
Definition at line 216 of file stk_c_threads.cpp.
References pthread_cond_signal().
Definition at line 219 of file stk_c_threads.cpp.
References pthread_cond_timedwait().
Definition at line 218 of file stk_c_threads.cpp.
References pthread_cond_wait().
| void mtx_destroy | ( | mtx_t * | mtx | ) |
Definition at line 213 of file stk_c_threads.cpp.
References pthread_mutex_destroy().
| int mtx_init | ( | mtx_t * | mtx, |
| int | type ) |
Definition at line 190 of file stk_c_threads.cpp.
References mtx_recursive, PTHREAD_MUTEX_DEFAULT, pthread_mutex_init(), PTHREAD_MUTEX_RECURSIVE, pthread_mutexattr_destroy(), pthread_mutexattr_init(), pthread_mutexattr_settype(), and thrd_error.
| int mtx_lock | ( | mtx_t * | mtx | ) |
Definition at line 209 of file stk_c_threads.cpp.
References pthread_mutex_lock().
| int mtx_timedlock | ( | mtx_t * | mtx, |
| const struct timespec * | ts ) |
Definition at line 210 of file stk_c_threads.cpp.
References pthread_mutex_timedlock().
| int mtx_trylock | ( | mtx_t * | mtx | ) |
Definition at line 211 of file stk_c_threads.cpp.
References pthread_mutex_trylock().
| int mtx_unlock | ( | mtx_t * | mtx | ) |
Definition at line 212 of file stk_c_threads.cpp.
References pthread_mutex_unlock().
| int thrd_create | ( | thrd_t * | thr, |
| thrd_start_t | func, | ||
| void * | arg ) |
Definition at line 109 of file stk_c_threads.cpp.
References pthread_create(), thrd_error, thrd_nomem, and thrd_success.
| thrd_t thrd_current | ( | void | ) |
Definition at line 145 of file stk_c_threads.cpp.
References pthread_self().
| int thrd_detach | ( | thrd_t | thr | ) |
Definition at line 172 of file stk_c_threads.cpp.
References pthread_detach(), thrd_error, and thrd_success.
Definition at line 140 of file stk_c_threads.cpp.
References pthread_equal().
| void thrd_exit | ( | int | res | ) |
Definition at line 167 of file stk_c_threads.cpp.
References pthread_exit().
| int thrd_join | ( | thrd_t | thr, |
| int * | res ) |
Definition at line 177 of file stk_c_threads.cpp.
References pthread_join(), and thrd_success.
| int thrd_sleep | ( | const struct timespec * | duration, |
| struct timespec * | remaining ) |
Definition at line 150 of file stk_c_threads.cpp.
References nanosleep().
| void thrd_yield | ( | void | ) |
Definition at line 162 of file stk_c_threads.cpp.
References sched_yield().
| int tss_create | ( | tss_t * | key, |
| tss_dtor_t | dtor ) |
Definition at line 225 of file stk_c_threads.cpp.
References pthread_key_create().
| void tss_delete | ( | tss_t | key | ) |
Definition at line 228 of file stk_c_threads.cpp.
References pthread_key_delete().
| void * tss_get | ( | tss_t | key | ) |
Definition at line 226 of file stk_c_threads.cpp.
References pthread_getspecific().
| int tss_set | ( | tss_t | key, |
| void * | val ) |
Definition at line 227 of file stk_c_threads.cpp.
References pthread_setspecific().