SUBROUTINE KICKER ( STATUS )
IMPLICIT NONE
INCLUDE ’SAE_PAR’
INCLUDE ’ACT_ERR’
INCLUDE ’MESSYS_ERR’
INTEGER STATUS
INTEGER SEQ
INTEGER REASON
CHARACTER*(PAR__SZNAM) NAME
CHARACTER*(MSG_VAL_LEN) VALUE
INTEGER LENGTH
IF ( STATUS .NE. SAI__OK ) RETURN
CALL TASK_GET_NAME ( NAME, STATUS )
IF ( NAME .EQ. ’WAIT’ ) THEN
CALL TASK_GET_SEQ ( SEQ, STATUS )
IF ( SEQ .EQ. 0 ) THEN
CALL TASK_PUT_DELAY ( 10000, STATUS )
CALL TASK_PUT_REQUEST ( ACT__WAIT, STATUS )
ELSE
CALL TASK_GET_REASON ( REASON, STATUS )
IF ( REASON .EQ. MESSYS__KICK ) THEN
CALL TASK_GET_VALUE ( VALUE, STATUS )
CALL MSG_OUT ( ’ ’, VALUE, STATUS )
ELSE IF ( REASON .EQ. MESSYS__RESCHED ) THEN
CALL MSG_OUT ( ’ ’, waked by timer’, STATUS )
ENDIF
ENDIF
ELSE IF ( NAME .EQ. ’KICK’ ) THEN
VALUE = ’waked by kick’
LENGTH = 13
CALL TASK_KICK ( ’WAIT’, LENGTH, VALUE, STATUS )
ENDIF
END