vrst_dtq

Outline

Reset data queue.

C format

 ER      vrst_dtq (ID dtqid);
Parameter(s)

I/O

Parameter

Description

I

 ID      dtqid;
ID number of the data queue.



Explanation

This service call reset the data queue specified by parameter dtqid.

The data having been accumulated by the data queue area are annulled. The tasks to wait to send data to the target data queue are released from the WAITING state, and EV_RST is returned as a return value for the tasks.

Note 1 In this service call, the tasks to wait to receive data do not released from the WAITING state.

Note 2 This service call is the function outside mITRON4.0 specification.

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_ID

-18

Invalid ID number.

- dtqid < 0

- dtqid > VTMAX_DTQ

E_CTX

-25

Context error.

- This service call was issued from a non-task.

- This service call was issued in the CPU locked state.

- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".

E_MACV

-26

Memory access violation.

- Stack pointer points out of user stack for invoking task.

E_NOEXS

-42

Non-existent object.

- The data queue specified by dtqid does not exist.