Everything

fsnd_dtq

ifsnd_dtq

Outline
Forced send to data queue.
C format
 ER      fsnd_dtq (ID dtqid, VP_INT data);
 ER      ifsnd_dtq (ID dtqid, VP_INT data);
Parameter(s)
I/O
Parameter
Description
I
 ID      dtqid;
ID number of the data queue.
I
 VP_INT  data;
Data element to be sent to the data queue.

Explanation
These service calls process as follows according to the situation of the data queue specified by the parameter dtqid.
- There is a task in the reception wait queue.
This service call transfers the data specified by parameter data to the task in the top of the reception wait queue. As a result, the task is unlinked from the reception wait queue and moves from the WAITING state (data reception wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
- There is no task neither in the reception wait queue and transmission wait queue.
This service call stores the data specified by parameter data to the data queue.
If there is no available space in the data queue, this service call deletes the oldest data in the data queue before storing the data specified by data to the data queue.
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 in the CPU locked state.
- The ifsnd_dtq was issued from task.
- The fsnd_dtq was issued from non-task.
- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".
E_MACV
-26
Memory access violation. (only for fsnd_dtq)
- Stack pointer points out of user stack for invoking task.
E_ILUSE
-28
Illegal use of service call.
- The capacity of the data queue area is 0.
E_NOEXS
-42
Non-existent object.
- The data queue specified by dtqid does not exist.