I was going through a re-entrancy guide on recommended practices when writing re-entrant code.
What other references and resources cover this topic?
What lint-like tools can be used to check for these issues?
I was going through a re-entrancy guide on recommended practices when writing re-entrant code.
What other references and resources cover this topic?
What lint-like tools can be used to check for these issues?
The guide is sufficient.
My personal rule of thumbs are only 2 for re-reentering code:
take only pass by value parameters, used only value passed in as parameters in the function.
if I need to use any global parameters or pointer (for performance or storage sake), use a mutex or semaphore to control access to it.
None really. Writting non-reentering code is usually more difficult than re-entring. Just follow those simple guidelines and don't try to do anything too waky and you'll be fine.
Non-reentering code is usually written for high-performance issues.
The guide is sufficient.
My personal rule of thumbs are only 2 for re-reentering code:
take only pass by value parameters, used only value passed in as parameters in the function.
if I need to use any global parameters or pointer (for performance or storage sake), use a mutex or semaphore to control access to it.
Ref: Page 462 [AN INTRODUCTION USING THE RENESAS RX62N MICROCONTROLLER] [James M. Conrad]
© 2022 - 2024 — McMap. All rights reserved.
sigsuspend(&zeromask)
.. you've just allowed processing interrupts that your caller disabled for a reason, trysigsuspend(&oldmask)
instead). – Thorn