Chapter Contents

Previous

Next
DETACH

DETACH



Remove a Subtask from the System

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
RELATED FUNCTIONS


SYNOPSIS

#include <ostask.h>

int DETACH(void **tcbaddr, option);


DESCRIPTION

The SAS/C DETACH macro implements the functionality of the OS/390 Assembler DETACH macro. The tcbaddr argument is the address of a void * area containing the address of the TCB to be detached. The option argument must be specified as either STAE or NOSTAE, indicating whether the assembler STAE=YES or STAE=NO option is required.

DETACH must be used for a terminated subtask to remove the TCB from the system. If any subtasks created by the SAS/C ATTACH function are still running when the program terminates, these subtasks are detached automatically.


RETURN VALUE

The DETACH macro returns the value returned in register 15 by the assembler DETACH macro.


EXAMPLE

See the example for the ATTACH macro earlier in this chapter.


RELATED FUNCTIONS

ATTACH


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.