Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair
Panel
titleQ

What is Reentrancy and Thread-Safety?

Panel
titleA

Depending on definition Reentrancy (= Interrupt Safety) and Thread Safety are two different things.

Reentrant: Reentrant functions can be called recursively and can be called simultaneously by two or more processes. Reentrant functions are often required in real-time applications or in situations where interrupt code and non-interrupt code must share a function (see Keil).

Thread Safe: Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfill their design specifications without unintended interaction (see Wikipedia). Thread-Safety is required when using an operating system and functions are called by different threads.

Panel
titleQ

Which Functions are reentrant/ Thread-Safe?

Panel
titleA

Reentrant: Reentrant library function usually end with "_r" . Reentrant newlib library functions and can be found here.

Thread-Safe: When thread safety is required, the developer needs to use thread safe functions. In many cases, thread safety of non thread safe functions can be achieved using Mutex functionalities.




Panel
bgColor#ffffff
titleSee also...

Filter by label (Content by label)
showLabelsfalse
spaces@self
showSpacefalse
cqllabel = "faq" and space = currentSpace ( )
labelsfaq