QUE Module
Application Program Interface
2-337
Instance Configuration Parameters
Description
The QUE module makes available a set of functions that manipulate
queue objects accessed through handles of type QUE_Handle. Each
queue contains an ordered sequence of zero or more elements
referenced through variables of type QUE_Elem, which are generally
embedded as the first field within a structure. The QUE_Elem item is
used as an internal pointer.
For example, the DEV_Frame structure, which is used by the SIO Module
and DEV Module to enqueue and dequeue I/O buffers, contains a field of
type QUE_Elem:
struct DEV_Frame { /* frame object */
QUE_Elem link; /* must be first field! */
Ptr addr; /* buffer address */
size_t size; /* buffer size */
Arg misc; /* reserved for driver */
Arg arg; /* user argument */
Uns cmd; /* mini-driver command */
Int status; /* status of command */
} DEV_Frame;
Many QUE module functions either are passed or return a pointer to an
element having the structure defined for QUE elements.
The functions QUE_put and QUE_get are atomic in that they manipulate
the queue with interrupts disabled. These functions can therefore be
used to safely share queues between tasks, or between tasks and SWIs
or HWIs. All other QUE functions should only be called by tasks, or by
tasks and SWIs or HWIs when they are used in conjunction with some
mutual exclusion mechanism (for example, SEM_pend / SEM_post,
TSK_disable / TSK_enable).
Once a queue has been created, use MEM_alloc to allocate elements for
the queue.
QUE Manager
Properties
The following global property can be set for the QUE module in the QUE
Manager Properties dialog of the DSP/BIOS Configuration Tool or in a
Tconf script:
❏
Object Memory
. The memory segment that contains the QUE
objects.
Tconf Name: OBJMEMSEG
Type: Reference
Example:
bios.QUE.OBJMEMSEG = prog.get("myMEM");
Name
Type
Default
comment
String
"<add comments here>"