06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

t_suspend Suspends a task indefinitely.<br />

#include <br />

unsigned long t_suspend(<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

This system call suspends execution of a task until a t_resume() call is made for<br />

the suspended task. The calling task suspends either itself or another task. The<br />

t_suspend() call prevents the specified task from contending for CPU time but<br />

does not directly prevent contention for any other resource. See Note 4.<br />

tid Specifies the task to suspend. If tid equals zero, the calling<br />

task suspends itself.<br />

This system call returns 0 on success, or an error code on failure.<br />

Hex Mnemonic Description<br />

0x05 ERR_OBJDEL Task was already deleted.<br />

0x06 ERR_OBJID tid incorrect: failed validity check.<br />

0x07 ERR_OBJTYPE Object type doesn’t match object ID;<br />

failed validity check.<br />

0x14 ERR_SUSP Task was already suspended.<br />

1. A task that calls t_suspend() on itself always returns 0.<br />

2. A suspended task can be deleted.<br />

1-162 <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!