|
PatchworkOS
|
Go to the source code of this file.
Functions | |
| static void | _thread_init (_thread_t *thread) |
| void | _threading_init (void) |
| _thread_t * | _thread_new (_thread_entry_t entry, void *private) |
| void | _thread_free (_thread_t *thread) |
| _thread_t * | _thread_get (tid_t id) |
Variables | |
| static _thread_t | thread0 |
| static list_t | threads |
| static mtx_t | mutex |
| void _thread_free | ( | _thread_t * | thread | ) |
Definition at line 61 of file thread.c.
References _thread_t::entry, free(), list_remove(), mtx_lock(), mtx_unlock(), mutex, thread0, and threads.
Referenced by thrd_exit(), and thrd_join().
Definition at line 72 of file thread.c.
References _thread_t::id, LIST_FOR_EACH, mtx_lock(), mtx_unlock(), mutex, NULL, and threads.
Referenced by _errno_get(), thrd_detach(), thrd_exit(), and thrd_join().
|
static |
Definition at line 11 of file thread.c.
References _THREAD_ATTACHED, atomic_init, _thread_t::entry, EOK, _thread_t::err, _thread_t::id, list_entry_init(), NULL, _thread_t::private, _thread_t::result, and _thread_t::state.
Referenced by _thread_new(), and _threading_init().
| _thread_t * _thread_new | ( | _thread_entry_t | entry, |
| void * | private | ||
| ) |
Definition at line 33 of file thread.c.
References _syscall_errno(), _syscall_thread_create(), _thread_init(), _thread_t::entry, ERR, errno, free(), _thread_t::id, list_push(), malloc(), mtx_lock(), mtx_unlock(), mutex, NULL, _thread_t::private, and threads.
Referenced by thrd_create().
| void _threading_init | ( | void | ) |
Definition at line 21 of file thread.c.
References _syscall_gettid(), _thread_init(), _thread_t::entry, _thread_t::id, list_init(), list_push(), mtx_init(), mtx_recursive, mutex, thread0, and threads.
Referenced by _user_init().
|
static |
Definition at line 9 of file thread.c.
Referenced by _thread_free(), _thread_get(), _thread_new(), and _threading_init().
|
static |
Definition at line 6 of file thread.c.
Referenced by _thread_free(), and _threading_init().
|
static |
Definition at line 8 of file thread.c.
Referenced by _thread_free(), _thread_get(), _thread_new(), _threading_init(), benchmark(), main(), and wait_unblock().