QUE_create
Application Program Interface
2-339
C Interface
Syntax
queue = QUE_create(attrs);
Parameters
QUE_Attrs
*attrs;
/* pointer to queue attributes */
Return Value
QUE_Handle queue;
/* handle for new queue object */
Description
QUE_create creates a new queue which is initially empty. If successful,
QUE_create returns the handle of the new queue. If unsuccessful,
QUE_create returns NULL unless it aborts (for example, because it
directly or indirectly calls SYS_error, and SYS_error is configured to
abort).
If attrs is NULL, the new queue is assigned a default set of attributes.
Otherwise, the queue’s attributes are specified through a structure of
type QUE_Attrs.
Note:
At present, no attributes are supported for queue objects, and the type
QUE_Attrs is defined as a dummy structure.
All default attribute values are contained in the constant QUE_ATTRS,
which can be assigned to a variable of type QUE_Attrs prior to calling
QUE_create.
You can also create a queue by declaring a variable of type QUE_Obj
and initializing the queue with QUE_new.
QUE_create calls MEM_alloc to dynamically create the object’s data
structure. MEM_alloc must acquire a lock to the memory before
proceeding. If another thread already holds a lock to the memory, then
there is a context switch. The segment from which the object is allocated
is described by the DSP/BIOS objects property in the MEM Module, page
2–205.
Constraints and
Calling Context
❏
QUE_create cannot be called from a SWI or HWI.
❏
You can reduce the size of your application program by creating
objects with the Tconf rather than using the XXX_create functions.
See Also
MEM_alloc
QUE_empty
QUE_delete
SYS_error
QUE_create
Create an empty queue