Visible to Intel only — GUID: GUID-951DCF78-8B6E-4F01-9AA7-0BCD5859F361
Visible to Intel only — GUID: GUID-951DCF78-8B6E-4F01-9AA7-0BCD5859F361
FOR_SET_REENTRANCY
Runtime Function: Controls the type of reentrancy protection that the Fortran Runtime Library (RTL) exhibits. This routine can be called from a C or Fortran program.
Module
USE IFCORE
result = FOR_SET_REENTRANCY (mode)
mode |
Must be of type INTEGER(4) and contain one of the following options:
|
Results
The result type is INTEGER(4). The return value represents the previous setting of the Fortran Runtime Library reentrancy mode, unless the argument is FOR_K_REENTRANCY_INFO, in which case the return value represents the current setting.
You must be using an RTL that supports the level of reentrancy you desire. For example, FOR_SET_REENTRANCY ignores a request for thread protection (FOR_K_REENTRANCY_THREADED) if you do not build your program with the thread-safe RTL.
Example
PROGRAM SETREENT
USE IFCORE
INTEGER*4 MODE
CHARACTER*10 REENT_TXT(3) /'NONE ','ASYNCH ','THREADED'/
PRINT*,'Setting Reentrancy mode to ',REENT_TXT(MODE+1)
MODE = FOR_SET_REENTRANCY(FOR_K_REENTRANCY_NONE)
PRINT*,'Previous Reentrancy mode was ',REENT_TXT(MODE+1)
MODE = FOR_SET_REENTRANCY(FOR_K_REENTRANCY_INFO)
PRINT*,'Current Reentrancy mode is ',REENT_TXT(MODE+1)
END