Option Type | Default Value | #pragma options | C | C++ |
-qoption | See Below | - | x | x |
Syntax
-qthreaded | -qnothreaded
Purpose
Indicates to the compiler that the program will run in a multi-threaded environment.
Always use this option when compiling or linking multi-threaded applications. This option
ensures that all optimizations are thread-safe.
Notes
This option applies to both compile and linkage editor operations.
To maintain thread safety, a file compiled with the -qthreaded option, whether explicitly by option selection or implicitly by choice of _r compiler invocation mode, must also be linked with the -qthreaded option.
This option does not make code thread-safe, but it will ensure that code already thread-safe will remain so after compile and linking.
Default
The default is -qthreaded when compiling with _r
invocation modes, and -qnothreaded when compiling with other invocation
modes.
Specify Compiler Options for Architecture-Specific, 32- or
64-bit Compilation
Compiler Modes
List of Compiler Options and Their Defaults
Options that Define the Compiler Object Code Produced
-qsmp
Equivalent Batch Compile-Link and Incremental
Build Options