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.

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

sm_av (pSOS+m kernel only) Asynchronously releases a semaphore token.<br />

#include <br />

unsigned long sm_av(<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call is used to asynchronously release a semaphore token. It is identical<br />

to sm_v() except the call is made asynchronously. Refer to the description of<br />

sm_v() for further information. This call is only supported by the pSOS+m kernel<br />

(the multiprocessor version).<br />

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

When called in a system running the pSOS+m kernel, this call always returns 0.<br />

The pSOS+ kernel (the single processor version) returns ERR_SSFN.<br />

If the sm_v() call fails and the node’s MC_ASYNCERR routine is present, that routine<br />

is invoked. The following error codes are possible:<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 />

If an MC_ASYNCERR routine is not provided, the pSOS+m kernel generates a fatal<br />

error.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!