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

t_setreg Sets a task’s notepad register.<br />

#include <br />

unsigned long t_setreg(<br />

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

unsigned long regnum, /* register number */<br />

unsigned long reg_value /* register value */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call enables the caller to modify the contents of a task's notepad<br />

register. Each task has 16 such software registers, held in the task's TCB. The<br />

purpose of these registers is to furnish every task with a set of named, permanent<br />

variables. Eight of these registers are reserved for system use, and eight are free to<br />

be used for application-specific purposes.<br />

tid Specifies the task ID of the task whose notepad register is<br />

set. If tid equals 0, the calling task sets its own notepad<br />

register.<br />

regnum Specifies the register number. Registers 0 through 7 are for<br />

application use, and registers 8 through 15 are reserved for<br />

system use.<br />

reg_value Specifies the value at which the register’s contents are to be<br />

set.<br />

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

Hex Mnemonic Description<br />

0x05 ERR_OBJDEL Task already deleted.<br />

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

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