Main Page Class Hierarchy Compound List File List Compound Members File Members Related Pages
include/unistd.h File Reference
Interface: reduced UNIX standard library.
More...
#include <tm.h>
#include <time.h>
Include dependency graph for unistd.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Detailed Description
Interface: reduced UNIX standard library.
-
Author:
-
Markus L. Noga <markus@noga.de>
Definition in file unistd.h.
Function Documentation
tid_t execi |
( |
int(* |
code_start)(int, char **), |
|
|
int |
argc, |
|
|
char ** |
argv, |
|
|
priority_t |
priority, |
|
|
size_t |
stack_size |
|
) |
|
|
|
start task executing (with passed paramters) called from user code -
Parameters:
-
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 to allocate to this task for its call stack |
-
Returns:
-
-1 if failed to start, else tid (task-id)
|
|
exit task, returning code -
Parameters:
-
code |
the exit code to return to the caller |
|
|
kill specified (tid) task -
Parameters:
-
tid |
TaskId of task to be killed |
-
Todo:
-
FIXME: this belongs in a different header
|
|
kill all tasks with priority less than or equal equal to p, excluding self. -
Parameters:
-
p |
priority of tasks at which or below we kill tasks |
-
Side Effects:
-
All tasks meeting this criteria are killed
|
unsigned int msleep |
( |
unsigned int |
msec |
) |
|
|
|
delay execution allowing other tasks to run -
Parameters:
-
msec |
sleep duration in milliSeconds |
-
Returns:
-
number of milliSeconds left if interrupted, else 0
-
Bug:
-
interruptions not implemented
|
void shutdown_task |
( |
tid_t |
tid |
) |
|
|
|
signal shutdown for a task -
Parameters:
-
tid |
TaskId of task to be notified |
|
|
signal shutdown for many tasks -
Parameters:
-
-
Todo:
-
research {flags}, then fix this documentation
|
unsigned int sleep |
( |
unsigned int |
sec |
) |
|
|
|
delay execution allowing other tasks to run.
-
Parameters:
-
sec |
sleep duration in seconds |
-
Returns:
-
number of seconds left if interrupted, else 0
-
Bug:
-
interruptions not implemented
|
|
suspend task until wakeup function returns non-null -
Parameters:
-
wakeup |
the function to be called when woken up |
data |
the wakeup_t structure to be passed to the called function |
-
Returns:
-
wakeup() return value
-
Note:
-
wakeup function is called in task scheduler context
Referenced by get_msg(). |
|
current task yields the rest of timeslice.
|
Generated on Tue Dec 10 00:09:07 2002 for brickOS C++ by
1.2.15