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_delete pSOS+ <strong>System</strong> <strong>Calls</strong><br />

t_delete Deletes a task.<br />

#include <br />

unsigned long t_delete(<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This service call enables a task to delete itself or another task. The pSOS+ kernel<br />

halts the task and reclaims its TCB, stack segment and any allocated timers.<br />

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

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

tid Specifies the task ID of the task to be deleted.<br />

This call returns 0 on success (unless the caller does a self-delete, in which case the<br />

call does not return) or returns an error on failure.<br />

Hex Mnemonic Description<br />

0x05 ERR_OBJDEL Task 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 />

0x18 ERR_DELFS pHILE+ resources in use.<br />

0x19 ERR_DELLC pREPC+ resources in use.<br />

0x1A ERR_DELNS pNA+ resources in use.<br />

0x53 ERR_ILLRSC Task not created from this node.<br />

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