INtime SDK Help
onexit

Registers a function to be called when the thread terminates normally.

#include <stdlib.h>

onexit_t onexit (onexit_t func);

Parameters

func
Pointer to function(s) to be called on normal termination using exit. The functions passed to onexit cannot take parameters.

Remarks

Successive calls to onexit create a register of functions that execute in LIFO (last-in, first-out) order. You can register a maximum of 128 functions.

The ANSI-standard atexit does the same thing as onexit; use it instead of onexit when ANSI portability is desired.

Return Values

A pointer to the function(s) to call.
Success.
A null pointer if the number of functions exceeds 128.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdlib.h stdlib.h clib.lib

See Also

atexit, exit