|
UbixOS V2
2.0
|


Go to the source code of this file.
Data Structures | |
| struct | ubthread |
| struct | ubthread_cond |
| struct | ubthread_cond_list |
| struct | ubthread_list |
| struct | ubthread_mutex |
| struct | ubthread_mutex_list |
Macros | |
| #define | LOCKED 1 |
| #define | UNLOCKED 0 |
Typedefs | |
| typedef struct ubthread_cond * | ubthread_cond_t |
| typedef struct ubthread_mutex * | ubthread_mutex_t |
| typedef struct ubthread * | ubthread_t |
Functions | |
| int | ubthread_cond_broadcast (ubthread_cond_t *cond) |
| 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 (struct taskStruct **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) |
| struct taskStruct * | ubthread_self () |
| #define LOCKED 1 |
Definition at line 36 of file ubthread.h.
| #define UNLOCKED 0 |
Definition at line 37 of file ubthread.h.
| typedef struct ubthread_cond* ubthread_cond_t |
Definition at line 40 of file ubthread.h.
| typedef struct ubthread_mutex* ubthread_mutex_t |
Definition at line 41 of file ubthread.h.
| typedef struct ubthread* ubthread_t |
Definition at line 39 of file ubthread.h.
| int ubthread_cond_broadcast | ( | ubthread_cond_t * | cond | ) |
Definition at line 164 of file ubthread.c.
Referenced by sys_sem_signal().
| int ubthread_cond_destroy | ( | ubthread_cond_t * | cond | ) |
Definition at line 71 of file ubthread.c.
References kfree().
Referenced by sem_destroy().

| int ubthread_cond_init | ( | ubthread_cond_t * | cond, |
| const uInt32 | attr | ||
| ) |
Referenced by sem_init(), and sys_sem_new().
| int ubthread_cond_signal | ( | ubthread_cond_t * | cond | ) |
Definition at line 157 of file ubthread.c.
| int ubthread_cond_timedwait | ( | ubthread_cond_t * | cond, |
| ubthread_mutex_t * | mutex, | ||
| const struct timespec * | abstime | ||
| ) |
Definition at line 129 of file ubthread.c.
References FALSE, ubthread_cond::lock, mutex, sched_yield(), systemVitals, vitalsStruct::sysUptime, ubthread_mutex_lock(), and ubthread_mutex_unlock().

| int ubthread_cond_wait | ( | ubthread_cond_t * | cond, |
| ubthread_mutex_t * | mutex | ||
| ) |
Definition at line 148 of file ubthread.c.
References ubthread_cond::lock, mutex, sched_yield(), TRUE, ubthread_mutex_lock(), and ubthread_mutex_unlock().

| int ubthread_create | ( | struct taskStruct ** | thread, |
| const uInt32 * | attr, | ||
| void(*)(void) | tproc, | ||
| void * | arg | ||
| ) |
Definition at line 83 of file ubthread.c.
References execThread().

| int ubthread_mutex_destroy | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 77 of file ubthread.c.
References kfree(), and mutex.
Referenced by sem_destroy(), and sys_mutex_free().

| int ubthread_mutex_init | ( | ubthread_mutex_t * | mutex, |
| const uInt32 | attr | ||
| ) |
Referenced by sem_init(), sys_mutex_new(), and sys_sem_new().
| int ubthread_mutex_lock | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 88 of file ubthread.c.
References _current, taskStruct::id, kpanic(), kprintf(), ubthread_mutex::lock, mutex, ubthread_mutex::pid, and TRUE.
Referenced by sys_arch_sem_wait(), sys_mutex_lock(), sys_sem_signal(), ubthread_cond_timedwait(), and ubthread_cond_wait().

| int ubthread_mutex_unlock | ( | ubthread_mutex_t * | mutex | ) |
Definition at line 109 of file ubthread.c.
References _current, taskStruct::id, kpanic(), kprintf(), ubthread_mutex::lock, mutex, ubthread_mutex::pid, and TRUE.
Referenced by sys_mutex_unlock(), sys_sem_signal(), ubthread_cond_timedwait(), and ubthread_cond_wait().

| struct taskStruct* ubthread_self | ( | ) |
Definition at line 45 of file ubthread.c.
References _current.