Functions | |||
![]() | ![]() | pid_t | execi (int (*code_start) (int, char **), int argc, char **argv, priority_t priority, size_t stack_size) |
![]() | ![]() | execute a memory image. More... | |
![]() | ![]() | void | exit (int code) __attribute__((noreturn)) |
![]() | ![]() | exit task, returning code. More... | |
![]() | ![]() | void | yield (void) |
![]() | ![]() | yield the rest of the current timeslice. More... | |
![]() | ![]() | wakeup_t | wait_event (wakeup_t(*wakeup) (wakeup_t), wakeup_t data) |
![]() | ![]() | suspend process until wakeup function is non-null. More... | |
![]() | ![]() | unsigned int | sleep (unsigned int sec) |
![]() | ![]() | delay execution allowing other tasks to run. More... | |
![]() | ![]() | unsigned int | msleep (unsigned int msec) |
![]() | ![]() | delay execution allowing other tasks to run. More... | |
![]() | ![]() | void | kill (pid_t pid) |
![]() | ![]() | kill a process. More... | |
![]() | ![]() | void | killall (priority_t p) |
![]() | ![]() | kill all processes with priority lower or equal than p, excluding self. |
pid_t execi (int(* code_start)(int,char **), int argc, char ** argv, priority_t priority, size_t stack_size) |
execute a memory image.
code_start | start address of code to execute |
argc | first argument passed, normally number of strings in argv |
argv | second argument passed, normally pointer to argument pointers. |
priority | new task's priority |
stack_size | stack size for new process |
void exit (int code) |
exit task, returning code.
code |
The return code
|
void yield (void) |
yield the rest of the current timeslice.
doesn't speed up the system clock.
wakeup_t wait_event (wakeup_t(* wakeup)(wakeup_t), wakeup_t data) |
suspend process until wakeup function is non-null.
wakeup | the wakeup function. called in task scheduler context. |
data | argument passed to wakeup function by scheduler |
unsigned int sleep (unsigned int sec) |
delay execution allowing other tasks to run.
sec | sleep duration in seconds |
unsigned int msleep (unsigned int msec) |
delay execution allowing other tasks to run.
msec | sleep duration in milliseconds |
void kill (pid_t pid) |
kill a process.
pid | must be valid process ID, or undefined behaviour will result! |
void killall (priority_t p) |
kill all processes with priority lower or equal than p, excluding self.