Chapter 5
Generated Code Architecture
5-52
ni.com
The formal argument represents the global reference number for which the
variable block is being accessed. The default implementation of those
simply calls the
Disable( )
function.
Leaving Non-Shared (Local) Critical Section
The prototype of the callout for leaving a non-shared global variable block
critical section is:
void Leave_Local_Varblk_Section(RT_INTEGER index);
procedure Leave_Local_Varblk_Section(index :
RT_INTEGER);
The formal argument represents the global reference number for which the
variable block is being accessed. The default implementation of those
simply calls the
Enable( )
function.
The following code uses the
Enter_Local_Varblk...
syntax to call
non-shared global variable block generated code with callouts, using the
-vbco
option.
Enter_Local_Varblk_Section(4);
proc2_4_1 = block5[0];
proc2_4_2 = block5[1];
Leave_Local_Varblk_Section(4);
Entering with Extended Procedure Info Option Specified
The prototype of the callout for entering a non-shared global variable block
critical section with the extended procedure info option is:
void Enter_Local_Varblk_Section(RT_INTEGER index, RT_INTEGER caller_id);
procedure Enter_Local_Varblk_Section(index : RT_INTEGER;
caller_id : RT_INTEGER);
The formal argument,
index
, represents the global reference number for
which the variable block is being accessed. The second formal argument,
caller_id
, represents a unique identifier for the caller. The default
implementation of those calls the
Disable
function.
Leaving with Extended Procedure Info Option Specified
The prototype of the callout for leaving a non-shared global variable block
critical section with the extended procedure info option is:
void Leave_Local_Varblk_Section(RT_INTEGER index, RT_INTEGER caller_id);
procedure Leave_Local_Varblk_Section(index : RT_INTEGER;
caller_id : RT_INTEGER);