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

q_delete Deletes an ordinary message queue.<br />

#include <br />

unsigned long q_delete(<br />

unsigned long qid /* queue identifier */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call deletes the ordinary message queue with the specified queue ID,<br />

and frees the QCB. q_delete() takes care of cleaning up the queue. If there are<br />

tasks waiting, they will be unblocked and given an error code. If some messages are<br />

queued there, the message buffers, along with any free private buffers are returned<br />

to the system-wide pool.<br />

The calling task does not have to be the creator of the queue in order to be deleted.<br />

However, a queue must be deleted from the node on which it was created.<br />

qid Specifies the queue ID of the queue to delete.<br />

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

Hex Mnemonic Description<br />

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

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

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

failed validity check.<br />

0x38 ERR_TATQDEL Informative only; there were tasks<br />

waiting at the queue.<br />

0x39 ERR_MATQDEL Informative only; there were messages<br />

pending in the queue.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!