
CHAPTER 4 RX78K/IV SYSTEM CALL LIST
60
4.4.2
ret_wup (Return and Wakeup Task)
[Function]
Returns from an interrupt handler and wakes up a task.
[Remarks]
Returns from an interrupt handler and wakes up an interrupt processing task indicated by tskid (the task
placed in the WAIT state by “slp_tsk” or “wai_tsk”). If the target task does not execute “slp_tsk” or “wai_tsk”,
the request is queued.
Even if “i
′′′
_yyy” system call is issued in the interrupt handler, dispatching does not take place and is
delayed until execution exits from the interrupt handler after this system call has been issued.
[System call ID number]
None
[Parameter]
tskid (Task Identifier)
Task ID (TCB top address)
- 24 bits (large model)
- 16 bits (small model)
[Return parameter]
None.
Does not return to the interrupt handler that issued the system call.
[Assembler format]
[Large/Small model]
MOVG
BR
UUP, #tskid
!ret_wup
Unlike the other system calls, this system call is caused to branch by the jump instruction.
Caution
When this system call is issued from an interrupt handler, be sure to save the register values
before the interrupt occured to the stack. Save the register values to the stack in the sequence
shown in Fig. 4-2. If the interrupt handler occupies a register bank, select the register bank of
the task executed before the interrupt has occurred, and then call this system call.
[C format]
ret_wup (tskid);
char
*tskid;
Remark
Because this system call is only supported in version 2.00 or above of the C complier CC78K4, it
cannot be used with a C complier of a version lower than 2.00. With a C complier of a version 2.00 or
above, specify “#pragma
D
rtos_interrupt” (refer to
APPENDIX 2
).