void Enter_Shared_Varblk_Section(RT_INTEGER processor, RT_INTEGER index);
procedure Enter_Shared_Varblk_Section(processor : RT_INTEGER;
void Leave_Shared_Varblk_Section(RT_INTEGER processor, RT_INTEGER index);
procedure Leave_Shared_Varblk_Section(processor : RT_INTEGER;
© National Instruments Corporation
The formal argument represents the global reference number for which the
variable block is being accessed. The second formal argument,
, represents a unique identifier for the caller. The default
caller_id
implementation of those simply calls the
The following code uses the
non-shared global variable block generated code with callouts, using the
and
options.
-vbco
-epi
Enter_Local_Varblk_Section(4, 1);
proc2_4_1 = block5[0];
proc2_4_2 = block5[1];
Leave_Local_Varblk_Section(4, 1);
Shared Global Variable Blocks
Variable blocks are defined as shared if more than one processor accesses
that variable block. There are sets of callouts for shared variable block
accesses. For a discussion of code generation for shared variable blocks,
refer to the
Shared Variable Block Support
Entering Shared Critical Section
The prototype of the callout for entering a shared variable block critical
section is:
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.
Leaving Shared Critical Section
The prototype of the callout for leaving a local variable block critical
section is:
Chapter 5
Enable( )
Enter_Local_Varblk...
index : RT_INTEGER);
index : RT_INTEGER);
5-53
Generated Code Architecture
function.
syntax to call
section.
AutoCode Reference
Need help?
Do you have a question about the AutoCode NI MATRIX and is the answer not in the manual?
Questions and answers