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_vcreate pSOS+ <strong>System</strong> <strong>Calls</strong><br />

Return Value<br />

Error Codes<br />

Notes<br />

qid Points to the variable where q_vcreate() stores the queue’s pSOSassigned<br />

queue ID.<br />

Queues created by q_vcreate() always have a fixed number of private buffers.<br />

The pSOS+ kernel uses maxnum and maxlen to allocate sufficient memory for<br />

message storage from region 0. If insufficient memory is available, an error is<br />

returned. Queues created with q_vcreate() never allocate or use message buffers<br />

from the pSOS+ message buffer pool.<br />

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

Hex Mnemonic Description<br />

0x08 ERR_OBJTFULL Node's object table full.<br />

0x30 ERR_KISIZE Global queue maxlen too large for KI.<br />

0x33 ERR_NOQCB Cannot allocate QCB; exceeds node's<br />

maximum number of active queues.<br />

0x34 ERR_NOMGB Not enough memory in region 0.<br />

1. Internally, the pSOS+ kernel treats a queue name as a 32-bit integer. However,<br />

when the application calls the kernel through the pSOS+ C language API, it<br />

passes the queue name as a four-byte character array.<br />

2. The pSOS+ kernel does not check for duplicate queue names. If duplicate<br />

names exist, an q_vident() can return the qid of any queue with the<br />

duplicate name.<br />

3. The maximum number of queues that can be simultaneously active is defined<br />

by the entry kc_nqcb in the pSOS+ Configuration Table. It applies to the<br />

combined total of both fixed and variable queues.<br />

4. The Q_GLOBAL attribute is ignored by the single-processor version of the pSOS+<br />

kernel.<br />

5. A special case occurs when maxnum is set to 0. In this case, a message can only<br />

be successfully sent if a task is already waiting at the queue.<br />

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