#include <ubixos/ubthread.h>
#include <ubixos/vitals.h>
#include <ubixos/exec.h>
#include <ubixos/sched.h>
#include <ubixos/time.h>
#include <ubixos/spinlock.h>
#include <lib/kmalloc.h>
#include <lib/kprintf.h>
Go to the source code of this file.
Functions | |
| int | ubthread_cond_destroy (ubthread_cond_t *cond) |
| int | ubthread_cond_init (ubthread_cond_t *cond, const uInt32 attr) |
| int | ubthread_cond_signal (ubthread_cond_t *cond) |
| int | ubthread_cond_timedwait (ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime) |
| int | ubthread_cond_wait (ubthread_cond_t *cond, ubthread_mutex_t *mutex) |
| int | ubthread_create (kTask_t **thread, const uInt32 *attr, void(*tproc)(void), void *arg) |
| int | ubthread_mutex_destroy (ubthread_mutex_t *mutex) |
| int | ubthread_mutex_init (ubthread_mutex_t *mutex, const uInt32 attr) |
| int | ubthread_mutex_lock (ubthread_mutex_t *mutex) |
| int | ubthread_mutex_unlock (ubthread_mutex_t *mutex) |
| kTask_t * | ubthread_self () |
Variables | |
| ubthread_cond_list * | conds = 0x0 |
| ubthread_mutex_list * | mutex = 0x0 |
| int ubthread_cond_destroy | ( | ubthread_cond_t * | cond | ) |
| int ubthread_cond_init | ( | ubthread_cond_t * | cond, | |
| const uInt32 | attr | |||
| ) |
Definition at line 49 of file ubthread.c.
References ubthread_cond::id, kmalloc(), ubthread_cond::locked, and UNLOCKED.
Referenced by sys_sem_new_().
| int ubthread_cond_signal | ( | ubthread_cond_t * | cond | ) |
Definition at line 126 of file ubthread.c.
References ubthread_cond::locked, and UNLOCKED.
Referenced by sys_sem_signal().
| int ubthread_cond_timedwait | ( | ubthread_cond_t * | cond, | |
| ubthread_mutex_t * | mutex, | |||
| const struct timespec * | abstime | |||
| ) |
Definition at line 106 of file ubthread.c.
References ubthread_mutex::locked, ubthread_cond::locked, mutex, sched_yield(), systemVitals, and UNLOCKED.
Referenced by cond_wait().
| int ubthread_cond_wait | ( | ubthread_cond_t * | cond, | |
| ubthread_mutex_t * | mutex | |||
| ) |
Definition at line 118 of file ubthread.c.
References ubthread_mutex::locked, LOCKED, ubthread_cond::locked, mutex, sched_yield(), and UNLOCKED.
Referenced by cond_wait().
Definition at line 77 of file ubthread.c.
References execThread(), kmalloc(), and x2000.
Referenced by sys_thread_new().
| int ubthread_mutex_destroy | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 71 of file ubthread.c.
References kfree(), and mutex.
Referenced by sys_sem_free_().
| int ubthread_mutex_init | ( | ubthread_mutex_t * | mutex, | |
| const uInt32 | attr | |||
| ) |
Definition at line 57 of file ubthread.c.
References ubthread_mutex::id, kmalloc(), ubthread_mutex::locked, mutex, and UNLOCKED.
Referenced by sys_sem_new_().
| int ubthread_mutex_lock | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 82 of file ubthread.c.
References _current, taskStruct::id, kprintf(), LOCKED, ubthread_mutex::locked, mutex, and ubthread_mutex::pid.
Referenced by sys_arch_sem_wait(), and sys_sem_signal().
| int ubthread_mutex_unlock | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 93 of file ubthread.c.
References _current, taskStruct::id, ubthread_mutex::locked, mutex, ubthread_mutex::pid, and UNLOCKED.
Referenced by sys_arch_sem_wait(), and sys_sem_signal().
| kTask_t* ubthread_self | ( | ) |
| struct ubthread_cond_list* conds = 0x0 |
Definition at line 42 of file ubthread.c.
| struct ubthread_mutex_list* mutex = 0x0 |
Definition at line 43 of file ubthread.c.
Referenced by cond_wait(), ubthread_cond_timedwait(), ubthread_cond_wait(), ubthread_mutex_destroy(), ubthread_mutex_init(), ubthread_mutex_lock(), and ubthread_mutex_unlock().
1.4.7