#include <tm.h>
#include <time.h>
Go to the source code of this file.
Functions | |
tid_t | execi (int(*code_start)(int, char **), int argc, char **argv, priority_t priority, size_t stack_size) |
void | shutdown_task (tid_t tid) |
void | shutdown_tasks (tflags_t flags) |
void | kill (tid_t tid) |
void | killall (priority_t p) |
void | exit (int code) __attribute__((noreturn)) |
void | yield (void) |
current task yields the rest of timeslice | |
wakeup_t | wait_event (wakeup_t(*wakeup)(wakeup_t), wakeup_t data) |
unsigned int | sleep (unsigned int sec) |
delay execution allowing other tasks to run | |
unsigned int | msleep (unsigned int msec) |
Definition in file unistd.h.
tid_t execi | ( | int(*)(int, char **) | code_start, | |
int | argc, | |||
char ** | argv, | |||
priority_t | priority, | |||
size_t | stack_size | |||
) |
start task executing (with passed paramters) called from user code
code_start | the entry-point of the new task | |
argc | the count of arguments passed (0 if none) | |
argv | an array of pointers each pointing to an argument (NULL if none) | |
priority | the priority at which to run this task | |
stack_size | the amount of memory in bytes to allocate to this task for its call stack |
void exit | ( | int | code | ) |
exit task, returning code
code | the exit code to return to the caller |
void kill | ( | tid_t | tid | ) |
kill specified (tid) task
tid | TaskId of task to be killed |
void killall | ( | priority_t | p | ) |
kill all tasks with priority less than or equal equal to p, excluding self.
p | priority of tasks at which or below we kill tasks |
unsigned int msleep | ( | unsigned int | msec | ) |
delay execution allowing other tasks to run
msec | sleep duration in milliSeconds |
void shutdown_task | ( | tid_t | tid | ) |
signal shutdown for a task
tid | TaskId of task to be notified |
void shutdown_tasks | ( | tflags_t | flags | ) |
signal shutdown for many tasks
flags | indicating... |
unsigned int sleep | ( | unsigned int | sec | ) |
delay execution allowing other tasks to run
sec | sleep duration in seconds |
suspend task until wakeup function returns non-null
wakeup | the function to be called when woken up | |
data | the wakeup_t structure to be passed to the called function |
Referenced by get_msg().
void yield | ( | void | ) |
current task yields the rest of timeslice
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2005 by the authors. |