diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-14 17:33:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-17 08:05:31 +0200 |
commit | 2cc25cf1b22f36c00c774c3abff94b4ba5dcf26c (patch) | |
tree | 1cdc947b93a5c411c39421ab990a2538d46dc11a /cpukit/include/rtems/score/isrlevel.h | |
parent | score: Improve parameters in _Thread_Change_life() (diff) | |
download | rtems-2cc25cf1b22f36c00c774c3abff94b4ba5dcf26c.tar.bz2 |
score: Add and use _Per_CPU_Is_ISR_in_progress()
Add _Per_CPU_Is_ISR_in_progress() as an optimized version of
_ISR_Is_in_progress().
Diffstat (limited to 'cpukit/include/rtems/score/isrlevel.h')
-rw-r--r-- | cpukit/include/rtems/score/isrlevel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/isrlevel.h b/cpukit/include/rtems/score/isrlevel.h index 3981f2c688..d578a32c48 100644 --- a/cpukit/include/rtems/score/isrlevel.h +++ b/cpukit/include/rtems/score/isrlevel.h @@ -144,6 +144,17 @@ typedef uint32_t ISR_Level; RTEMS_COMPILER_MEMORY_BARRIER(); \ } while (0) +/** + * @brief Checks if an ISR in progress. + * + * This function returns true, if the processor is currently servicing + * and interrupt, and false otherwise. A return value of true indicates + * that the caller is an interrupt service routine, **not** a thread. + * + * @return true Returns true, if called from within an ISR, otherwise false. + */ +bool _ISR_Is_in_progress( void ); + /** @} */ #ifdef __cplusplus |