Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question in RTX51 tiny - rtos for 8051, help me.

Status
Not open for further replies.

kisudu

Junior Member level 1
Joined
May 16, 2006
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,518
rtx-51 functions

Dear,
I'm trying RTOS for 8051, but I have problem with term “Reentrant Functions” in RTX51 Tiny. I don’t understand this term, so could anybody help and tell me the difference between “Reentrant Functions” and others functions c.
Here is the context of “Reentrant Functions” support by Keil.

"The C51 Compiler provides support for reentrant functions. Reentrant functions store parameters and local variables on a reentrant stack. This protects them from recursive or simultaneous calls. RTX51 Tiny does not contain any management for the C51 reentrant stack. So, if you use 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 round-robin task switching.
C functions, which use only registers for parameter and automatic variables, are inherently reentrant and may be called without any restrictions from RTX51 Tiny.
Non-reentrant C functions may not be called from more than one task or interrupt procedure. Non-reentrant C51 functions store their parameters and automatic variables (local data) in static memory segments which may be overwritten when the function is called from multiple tasks simultaneously or recursively.
You may invoke non-reentrant functions from multiple tasks if you ensure that they are not called recursively (simultaneously). Usually this means that round-robin task scheduling must be disabled and that your non-reentrant functions may not call any RTX51 Tiny system functions.
Note
• You should disable Round-Robin Task Switching if you wish to invoke reentrant or non-reentrant function from more than one task or interrupt.
"
Thanks for yours help,
Best regards,
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top