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.

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

Error Codes<br />

Notes<br />

Hex Mnemonic Description<br />

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

only if a timeout was requested.<br />

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

0x06 ERR_OBJID qid incorrect; failed validity checks.<br />

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

failed validity check.<br />

0x36 ERR_QKILLD Queue deleted while task waiting.<br />

0x37 ERR_NOMSG Queue empty; this error code is<br />

returned only if Q_NOWAIT was<br />

selected.<br />

0x54 ERR_NOAGNT Cannot wait; the remote node is out of<br />

agents.<br />

0x3A ERR_VARQ Queue is variable length.<br />

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

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

waiting.<br />

1. If it is necessary to block the calling task, q_receive() will enter the calling<br />

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

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

If the queue was created with the Q_PRIOR attribute, then the task will be<br />

inserted into the wait queue by priority.<br />

2. q_receive() requests a message from an ordinary message queue. Use<br />

q_vreceive() to request a message from a variable length message queue.<br />

Multiprocessor Considerations<br />

If qid identifies a global queue residing on another processor node, the local kernel<br />

will internally make an RSC to that remote node to request a message from that<br />

queue. If the Q_WAIT attribute is elected, then the pSOS+m kernel on the target<br />

node must use an agent to wait for the message. An agent is an internal object<br />

created by pSOS+ to simulate a task on a remote node. If the node is temporarily<br />

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