06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

t_start pSOS+ <strong>System</strong> <strong>Calls</strong><br />

t_start Starts a task.<br />

#include <br />

unsigned long t_start(<br />

unsigned long tid, /* task identifier */<br />

unsigned long mode, /* initial task attributes */<br />

void (*start_addr)(), /* task address */<br />

unsigned long targs[4]/* startup task arguments */<br />

)<br />

Description<br />

Arguments<br />

This system call places a newly created task into the ready state to await scheduling<br />

for execution. The calling task does not have to be the creator (or parent) of the task<br />

to be started. However, a task must be started from the node on which it was<br />

created.<br />

tid Specifies the task to start. tid is returned by the t_create() and<br />

t_ident() calls.<br />

mode Specifies the initial task attributes. mode is formed by ORing the<br />

following symbolic constants (one from each pair), which are defined<br />

in . For instance, to specify that a task should have<br />

preemption turned off, you place the symbolic constant<br />

T_NOPREEMPT in mode. To specify that the task should have<br />

preemption turned off and roundrobin by time-slicing turned on,<br />

you place both T_NOPREEMPT and T_TSLICE in mode, using the<br />

following syntax:<br />

T_NOPREEMPT | T_TSLICE<br />

T_PREEMPT /<br />

T_NOPREEMPT<br />

Task is / is not preemptible.<br />

T_TSLICE /<br />

T_NOTSLICE<br />

T_ASR /<br />

T_NOASR<br />

Task can /cannot be time-sliced.<br />

Task’s ASR is enabled / disabled.<br />

1-158 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!