### Critical Functions

Nonreentrant functions are functions which cannot be used concurrently by two or more tasks. All nonreentrant functions are classified as critical functions. Most I/O and allocation functions, and those that begin or end threads or processes, fall in this class.

OS/2 system libraries contain no critical functions.

The critical functions in the IBM C and C++ Compilers run-time library are:

atexit calloc _cgets clearerr _cprintf _cputs _cscanf _debug_calloc _debug_free _debug_heapmin _debug_malloc _debug_realloc _debug_ucalloc _debug_uheapmin _debug_umalloc _dump_allocated _endthread _Exception execl execle execlp _execlpe execv execve execvp _execvpe exit fclose _fcloseall fdopen feof ferror fflush fgetc fgetpos fgets fgetws fgetwc fileno _flushall fopen fprintf | fputc fputs fputws fputwc fread free freopen fscanf fseek fsetpos ftell fwrite fwprintf fwscanf _getch _getche getenv gets getwc getwchar _heap_check _heapchk _heapmin _heapset _heap_walk _interupt _kbhit malloc _onexit printf _putch putenv puts putwc putwhcar raise realloc remove rename rewind _rmtmp | scanf setlocale setvbuf signal _spawnl _spawnle _spawnlp _spawnlpe spawnv _spawnve _spawnvp _spawnvpe system _tcalloc tempnam _tfree _theapmin _tmalloc tmpfile tmpnam _trealloc _uaddmem _ucalloc _ucreate _udefault _udestroy _udump_allocated _dump_allocated_delta _udump_allocated_delta ungetc _ungetch _uheapchk _uheapmin _uheapset _uheap_walk _umalloc _upool vfprintf vfwprintf vprintf vwprintf wprintf wscanf

Signal and Exception Handling
Signals and Exceptions in Critical Functions

Reentrant Functions