Reentrant Functions - Intel i960 User Manual

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

9

Reentrant Functions

9-6
i960 Processor Compiler User's Guide
In the compiler's output,
contains the unbiased address of
program must perform the correct biasing of values before the point where
the program uses the pointers.
Reentrant functions can suspend execution, and later resume execution
from the same state at which the suspension took place. Current state data
must be preserved while a reentrant function is suspended.
A reentrant function can be active in several different places, in any of the
following ways:
a multi-tasking situation with two or more threads executing in the
same memory space; for example, an interrupt handler
a time-sliced environment in which two or more processes are
executing, with one process active and all others suspended at any
given time
a recursive function, with any one instance of a function active while
all duplicate instances of the function are suspended
For a function to be reentrant, it must not:
modify memory or registers in use by a concurrent or suspended
function
reference shared variable data
call a non-reentrant function
Designing Reentrant Functions
Since the compiler cannot determine data use across modules, the
compiler does not issue any warnings for potentially non-reentrant code
sequences. For more information about library reentrancy, refer to the
i960 Processor Library Supplement.
contains the unbiased address of
p
. To use the initialized
f
, and
i
g
or
, a
p
g

Advertisement

Table of Contents
loading

Table of Contents