Component: Thread safety

Macro name

CYGSEM_LIBC_THREAD_SAFETY

Type

Boolean

Description

This option controls whether the C library has support for thread safe operation in general. This requires eCos kernel support for per-thread data, and adjustment of the stack limit.

Option: Per-thread errno

Macro name

CYGSEM_LIBC_PER_THREAD_ERRNO

Type

Boolean

Description

This option controls whether the standard error code reporting variable errno is a per-thread variable, rather than global.

Option: Per-thread strtok()

Macro name

CYGSEM_LIBC_PER_THREAD_STRTOK

Type

Boolean

Description

This option controls whether the string function strtok() has its state recorded on a per-thread basis rather than global. If this option is disabled, some per-thread space can be saved. Note there is also a POSIX-standard strtok_r() function to achieve a similar effect with user support.

Option: Per-thread rand()

Macro name

CYGSEM_LIBC_PER_THREAD_RAND

Type

Boolean

Description

This option controls whether the pseudo-random number generation functions rand() and srand() have their state recorded on a per-thread basis rather than global. If this option is disabled, some per-thread space can be saved. Note there is also a POSIX-standard rand_r() function to achieve a similar effect with user support.

Option: Thread safe I/O streams

Macro name

CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS

Type

Boolean

Description

This option controls whether standard I/O streams are thread-safe. Having this option set allows the streams to be locked when accessed by multiple threads simultaneously.