;+ ; #.#.# ; ; ; Remove A task (REMOVE) ; ; ; FUNCTION: ; Removes specified task's TCB from the system. ; ; ; CALLING SEQUENCE: ; ; CALL REMOVE ( TNAME, STATUS) ; where: ; argument description PA/RE ; -------- ----------- -- ; TNAME Task name in Rad50. PA ; ; STATUS Return status RE ; 1 = success ; ; ; SUBROUTINES REFERENCED: ; ; $SRSTD $REMOV $SWSTK ; ; DESCRIPTION: ; REMOVE searches the tcb list for the specified task name and ; if found, calls the executive routine $REMOV to remove the ; task's tcb from the tcb list. ; ; ; SPECIAL CONSIDERATIONS: ; ; 1. REMOVE maps to the executive space so the calling ; task must be privileged (PR:5). ; ;- .TITLE REMOVE ; ; CODE SECTION ; ------------------------------------ ; .PSECT ELF$I,RO,I,LCL,REL,CON ; REMOVE:: MOV 2(R5),TNAME ; get task name address CALL $SWSTK,30$ ; system state MOV TNAME,R3 ; get task name address CLR STATUS ; set default status CALL $SRSTD ; search for the tcb BCS 20$ ; cs -> not found CALL $REMOV ; call exec remove routine INC STATUS ; set it removed 20$: RETURN ; back to user state 30$: MOV STATUS,@4(R5) ; set return status RETURN ; ; DATA AREA ; ------------------------------------ ; .PSECT ELF$D,RW,D,LCL,REL,CON TNAME: .WORD 0 STATUS: .WORD 0 .END