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.

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

sm_v Releases a semaphore token.<br />

#include <br />

unsigned long sm_v(<br />

unsigned long smid /* semaphore identifier */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

This system call is used to release a semaphore token. If a task is already waiting at<br />

the semaphore, it is unblocked and made ready to run. If there is no task waiting,<br />

then the semaphore token count is simply incremented by 1.<br />

smid Specifies the semaphore ID of the semaphore token to release.<br />

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

Hex Mnemonic Description<br />

0x05 ERR_OBJDEL Semaphore has been deleted.<br />

0x06 ERR_OBJID smid incorrect; failed validity check.<br />

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

failed validity check.<br />

0x65 ERR_STALEID Object's node has failed.<br />

If the caller is a task, it may be preempted as a result of this call.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-131<br />

1

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

Saved successfully!

Ooh no, something went wrong!