-qthreaded

Category

Object code control

@PROCESS directive

None.

Purpose

Indicates to the compiler whether it must generate threadsafe code.

Syntax

Read syntax diagramSkip visual syntax diagram>>- -q--threaded-----------------------------------------------><
 

Defaults

-qthreaded is the default for the xlf_r, , xlf90_r, , xlf95_r, and xlf2003_r commands.

Usage

Specifying the -qthreaded option implies -qdirective=ibmt, and by default, the trigger_constant IBMT is recognized.

The -qthreaded option does not imply the -qnosave option. The -qnosave option specifies a default storage class of automatic for user local variables. In general, both of these options need to be used to generate thread-safe code. Specifying these options ensures that variables and code created by the compiler are threadsafe; it does not guarantee the thread safety of user-written code.

If you use the ENTRY statement to have an alternate entry point for a subprogram and the xlf_r command to compile, also specify the -qxlf77=nopersistent option to be thread-safe. You should implement the appropriate locking mechanisms, as well.