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.

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

q_vbroadcast Broadcasts identical variable-length messages to a message queue.<br />

#include <br />

unsigned long q_vbroadcast(<br />

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

void *msg_buf, /* message buffer */<br />

unsigned long msg_len, /* length of message */<br />

unsigned long *count /* number of tasks */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

This system call sends a message to all tasks waiting at a specified variable length<br />

queue. Otherwise, it is identical to q_broadcast().<br />

qid Specifies the queue ID of the target queue.<br />

msg_buf Points to the message to send.<br />

msg_len Specifies the length of the message. It must not exceed the queue's<br />

maximum message length, which was specified with q_vcreate().<br />

count Points to the variable where q_vbroadcast() stores the number of<br />

tasks readied by the broadcast.<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 />

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

failed validity check.<br />

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