Keil Logo

C51: WHEN ARE FUNCTIONS REENTRANT


Information in this article applies to:

  • C51 All Versions

QUESTION

I know that functions which use just CPU registers are reentrant, when they call no other non-reentrant functions. How can I be sure that a function uses just CPU registers? Is this visible somewhere?

ANSWER

Yes, you may review the linker map file (extension *.M51 for BL51). Under the section OVERLAY MAP OF MODULE, all that have overlayable data segments are listed. When your function is not listed, or when the function is listed, but no overlay segments are listed under the BIT or DATA GROUPS, the function uses just CPU registers.

It should be noted that the Linker/Locater checks during the overlay process of a non-reentrant function is called by more than one process. So when there is no warning message, you are almost safe there your program does not violate reentrancy.

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.