summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-17 08:05:37 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-20 15:18:48 +0100
commitfea848bbbc8b63204677765cdcf8f5957e0ccf86 (patch)
tree76889a28a19ad7e90283c445f57b9d620e2963a1 /cpukit/include/rtems/score
parentvalidation: Add signal manager tests (diff)
downloadrtems-fea848bbbc8b63204677765cdcf8f5957e0ccf86.tar.bz2
score: Change thread action locking
Require that the corresponding lock is acquired before the action handler returns. This helps to avoid recursion in the signal processing. Update #4244.
Diffstat (limited to 'cpukit/include/rtems/score')
-rw-r--r--cpukit/include/rtems/score/thread.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index 0920a44177..e23261701a 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -594,20 +594,23 @@ typedef enum {
typedef struct Thread_Action Thread_Action;
/**
- * @brief Thread action handler.
+ * @brief This type defines the prototype of thread action handlers.
*
* The thread action handler will be called with interrupts disabled and a
- * corresponding lock acquired, e.g. _Thread_State_acquire(). The handler must
- * release the corresponding lock, e.g. _Thread_State_release(). So, the
- * corresponding lock may be used to protect private data used by the
- * particular action.
+ * corresponding lock acquired, e.g. _Thread_State_acquire(). The handler may
+ * release the corresponding lock, e.g. _Thread_State_release(). If the lock
+ * is released, it shall be acquired before the handler returns using the lock
+ * context. The lock may be used to protect private data used by the action.
*
* Since the action is passed to the handler additional data may be accessed
* via RTEMS_CONTAINER_OF().
*
- * @param[in] the_thread The thread performing the action.
- * @param[in] action The thread action.
- * @param[in] lock_context The lock context to use for the lock release.
+ * @param[in, out] the_thread is the thread performing the action.
+ *
+ * @param[in, out] action is the thread action.
+ *
+ * @param[in, out] lock_context is the lock context to use for the optional
+ * lock release and acquire.
*/
typedef void ( *Thread_Action_handler )(
Thread_Control *the_thread,