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_p<br />

Error Codes<br />

Notes<br />

Hex Mnemonic Description<br />

0x01 ERR_TIMEOUT Timed out; this error code is returned only if a<br />

timeout was requested.<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; failed validity<br />

check.<br />

0x42 ERR_NOSEM No semaphore; this error code is returned only if<br />

SM_NOWAIT was selected.<br />

0x43 ERR_SKILLD Semaphore deleted while task waiting.<br />

0x54 ER_NOAGNT Cannot wait on remote object; no free agents at<br />

node.<br />

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

0x66 ERR_NDKLD Object's node failed while RSC waiting.<br />

If it is necessary to block the calling task, sm_p() will enter the calling task in the<br />

semaphore's task-wait queue. If the semaphore was created with the SM_FIFO<br />

attribute, then the task is simply entered at the tail of the wait queue. If the<br />

semaphore was created with the SM_PRIOR attribute, then the task is inserted into<br />

the wait queue by priority.<br />

Multiprocessor Considerations<br />

If smid identifies a global semaphore residing on another processor node, the local<br />

kernel will internally make an RSC to that remote node to acquire a semaphore<br />

token. If the SM_WAIT attribute is used, then the pSOS+ kernel on the target node<br />

must use an agent to wait for the semaphore token. If that node is temporarily out<br />

of agents, the call will fail. The number of agents on each node is defined by the<br />

mc_nagent entry in the node's Multiprocessor Configuration Table.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!