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.

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

q_ident Obtains the queue ID of an ordinary message queue.<br />

#include <br />

unsigned long q_ident(<br />

char name[4], /* queue name */<br />

unsigned long node, /* node number */<br />

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

)<br />

Description<br />

Arguments<br />

Return Value<br />

The intended purpose of this system call is to enable the calling task to obtain the<br />

queue ID of an ordinary message queue. However, since a variable length message<br />

queue is just a special type of message queue, q_ident() and q_vident() are<br />

functionally identical. Both return the queue ID of the first queue encountered with<br />

the specified name, whether it be ordinary or variable length.<br />

Most system calls, except q_create()/q_vcreate() and q_ident()/<br />

q_vident(), reference a queue by its queue ID. For other tasks, one way to obtain<br />

the queue ID is to use q_ident()/q_vident(). Once obtained, the queue ID can<br />

then be used in all other operations relating to this queue.<br />

name Specifies the name of the message queue.<br />

node For multiprocessing systems, is a search order specifier. See<br />

“Multiprocessor Considerations.” In a single node system,<br />

this argument must be 0.<br />

qid Points to the variable where q_ident() stores the ID of the<br />

named message queue.<br />

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

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

1

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

Saved successfully!

Ooh no, something went wrong!