Reentrant Functions; C51 Library Functions; Usage Of Multiple Data Pointers And Arithmetic Units - Keil RTX51 Manual

Table of Contents

Advertisement

16
RTX51 Tiny uses the 8051 timer 0 and the timer 0 interrupt of the 8051. Globally dis-
abling all interrupts (EA bit) or the timer 0 interrupt stops therefore the operation of
RTX51 Tiny. Except for a few 8051 instructions, the timer 0 interrupt should not be dis-
abled.

Reentrant Functions

2
It is not allowed to call non-reentrant C functions from several tasks or interrupt proce-
dures. Non-reentrant C51 functions store their parameters and automatic variables (local
data) in static memory segments; for this reason, this data is overwritten when multiple
function calls occur simultaneously. Therefore non-reentrant C functions can only be call
for several tasks, if the user can ensure that they are not called recursive. Usally this
means that the Round-Robin task scheduling must be disabled and that such functions do
not call any RTX51 Tiny system functions.
C functions which are only using registers for parameter and automatic variables are in-
herently reentrant and can be called without any restrictions from different RTX51 Tiny
tasks.
The C51 Compiler provides also reentrant functions. Refer to the C51 User's Manual for
more information. Reentrant functions store their parameters and local data variables on
a reentrant stack and the data are protected in this way against multiple calls. However,
RTX51 Tiny does not contain any management for the C51 reentrant stack. If you are
using reentrant functions in your application you must ensure that these functions do not
call any RTX51 Tiny system functions and that reentrant functions are not interrupted by
the Round-Robin task scheduling of RTX51 Tiny. The full version, RTX51 Full contains
a stack management for reentrant functions.

C51 Library Functions

All C51 library functions which are reentrant can be used in all tasks without any restric-
tions.
For C51 library functions which are non-reentrant the same restrictions apply as for non-
reentrant C functions. Refer to Reentrant Functions for more information.

Usage of Multiple Data Pointers and Arithmetic Units

The C51 compiler allows you to use Multiple Data Pointers and Arithmetic Units of vari-
ous 8051 derivatives. Since RTX51 Tiny does not contain any management for these
hardware components it is recommended that you are not using these components to-
gether with RTX51 Tiny. However you can use Multiple Data Pointers and Arithmetic
Units if you can ensure that there is no round-robin task during the execution of program
parts using such additional hardware components.
Introduction to RTX51 Tiny

Advertisement

Table of Contents
loading

Table of Contents