Chapter 5
Generated Code Architecture
5-54
ni.com
The first formal argument represents which processor the access is taking
place on. Processor numbers are 1-based. The second formal argument
represents the global reference number for which the variable block is
being accessed.
The following code uses the
Enter_Shared_Varblk...
syntax to call
shared variable block generated code with callouts, using the
-vbco
option.
Enter_Shared_Varblk_Section(1, 4);
proc2_4_1 = block5[0];
proc2_4_2 = block5[1];
Leave_Shared_Varblk_Section(1, 4);
Entering with Extended Procedure Info Option Specified
The prototype of the callout for entering a shared variable block critical
section with the extended procedure info option is:
void Enter_Shared_Varblk_Section(RT_INTEGER index, RT_INTEGER caller_id);
procedure Enter_Shared_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.
Note
A default implementation is not provided for these callouts.
Leaving with Extended Procedure Info Option Specified
The prototype of the callout for leaving a shared variable block critical
section with the extended procedure info option is:
void Leave_Shared_Varblk_Section(RT_INTEGER index, RT_INTEGER caller_id);
procedure Leave_Shared_Varblk_Section(index : RT_INTEGER;
caller_id : RT_INTEGER);
The first formal argument 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.
Note
A default implementation is not provided for these callouts.