OAR

RTEMS GNU Tools On-Line Library


Reentrancy

PREV UP NEXT Bookshelf

Chapter 2: Reentrancy Properties of libm

When a libm function detects an exceptional case, errno may be set, the matherr function may be called, and a error message may be written to the standard error stream. This behavior may not be reentrant.

With reentrant C libraries like the Cygnus C library, errno is a macro which expands to the per-thread error value. This makes it thread safe.

When the user provides his own matherr function it must be reentrant for the math library as a whole to be reentrant.

In normal debugged programs, there are usually no math subroutine errors---and therefore no assignments to errno and no matherr calls; in that situation, the math functions behave reentrantly.


PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.