ARM Technical Support Knowledge Articles

WHEN ARE FUNCTIONS REENTRANT

Applies to: C51 C Compiler

Answer


Information in this article applies to:


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

Article last edited on: 2005-07-15 10:01:51

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential