-
cre_dtq
acre_dtq
-
ER cre_dtq (ID dtqid, T_CDTQ *pk_cdtq );
ER_ID acre_dtq ( T_CDTQ *pk_cdtq );
|
|
|
|
ID dtqid;
|
ID number of the data queue.
|
|
T_CDTQ *pk_cdtq;
|
Pointer to the packet containing the data queue creation information.
|
[Data queue creation information packet : T_CDTQ]
typedef struct t_cdtq {
ATR dtqatr; /*Data queue attribute*/
UINT dtqcnt; /*Capacity of the data queue area (the number of data elements)*/
VP dtq; /*Start address of the data queue area*/
} T_CDTQ;
|
This service call can be called from tasks that belong to
Trusted Domain.
The cre_dtq creates a data queue with data queue ID indicated by
dtqid according to the content of
pk_cdtq. The acre_dtq creates a data queue according to the content of
pk_cdtq, and returns the created data queue ID.
1 ) Data queue attribute (
dtqatr)
The following are specified for
dtqatr.
dtqatr := ( TA_TFIFO || TA_TPRI
-
TA_TFIFO ( = 0x0000)
Task wait queue for sending is managed in FIFO order.
-
TA_TPRI ( = 0x0001)
Task wait queue for sending is managed in task current priority order. Among tasks with the same priority, they are queued in FIFO order.
Note Task wait queue for receiving is managed in FIFO order.
2 ) Capacity of the data queue area (
dtqcnt), Start address of the data queue area (
dtq)
The application acquires TSZ_DTQ(
dtqcnt) bytes of data queue area and specifies the start address for
dtq.
It is also possible to specify 0 as
dtqcnt. In this case, since data cannot be stored in the data queue, the data sending task or data receiving task that has performed its operation first will enter the WAITING state. The WAITING state of that task is canceled when the task of another side has performed its operation. Thus, data sending tasks and data receiving tasks are completely synchronized. Note,
dtq is disregarded when
dtqcnt is 0.
Note 2 The RI600PX is not concerned of anything of the access permission to the data queue area. Usually, the data queue area should be generated to the area other than memory objects and user stacks. When the data queue area is generated in the memory object, a task with the operand-write access permission to the memory object might rewrite data queue area by mistake.
Note 3 The
mITRON4.0 specification defines the function that the kernel allocates data queue area when NULL is specified for
dtq. But RI600PX does not support this function.
|
|
|
|
|
Normal completion of acre_dtq. (Created data queue ID)
|
|
|
Normal completion of cre_dtq.
|
|
|
- Either of bits in dtqatr except bit0 is 1.
|
|
|
- dtqcnt != 0 and dtq + TSZ_DTQ( dtqcnt) > 0x100000000
|
|
|
Invalid ID number. (only for cre_dtq)
|
|
|
- This service call was issued in the CPU locked state.
- This service call was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
|
|
|
- Stack pointer points out of user stack for invoking task.
- The operand-read access to the area indicated by pk_cdtq has not been permitted to the invoking task.
|
|
|
- The invoking task does not belong to trusted domain.
|
|
|
- dtqcnt != 0 and dtq == NULL
|
|
|
No ID number available.(only for acre_dtq)
|
|
|
Object state error. (only for cre_dtq)
- The data queue specified by dtqid exists.
|