The
adi_int_EnterCriticalRegion()
type
and returns an argument of type
void *
from the
adi_int_EnterCriticalRegion()
to the corresponding
ple, examine the following code sequence:
...
Value = adi_int_EnterCriticalRegion(pArg);
...
adi_int_ExitCriticalRegion(Value);
...
The value returned from the
must be passed to the corresponding
function. Although nesting of calls to these functions is allowed, the appli-
cation developer minimizes the use of these functions to only those critical
sections of code, and realizes that in all likelihood, the processor is being
placed in some altered state. This could affect the performance of the sys-
tem, while in the critical regions.
For example, it could be that interrupts are disabled in the critical region.
The application developer typically does not want to have interrupts
disabled for long periods of time. These functions should be used spar-
ingly and judiciously.
Nesting of these calls is allowed. For example, consider the following code
sequence that makes a call to the
of code. The
Foo()
...
Value = adi_int_EnterCriticalRegion(pArg);
...
Foo();
adi_int_ExitCriticalRegion(Value);
...
VisualDSP++ 5.0 Device Drivers and System
Services Manual for Blackfin Processors
adi_int_ExitCriticalRegion()
adi_int_EnterCriticalRegion()
function also has a critical region of code.
// critical section of code
// call to Foo()
function is passed an argument of
void *
function must always be passed
// critical section of code
adi_int_ExitCriticalRegion()
function while in a critical section
Foo()
Interrupt Manager
. The value returned
function. For exam-
function
2-13
Need help?
Do you have a question about the VisualDSP++ 5.0 and is the answer not in the manual?