summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-11 08:35:22 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 11:00:28 +0100
commit50aef135a405a0dc26c39d7cfe7066f85b3dfbb5 (patch)
tree772b2944bdbd60ee514f04d78b5471fdbd71d480 /cpukit/include/rtems/score
parentscore: Remove thread timer earlier (diff)
downloadrtems-50aef135a405a0dc26c39d7cfe7066f85b3dfbb5.tar.bz2
score: Add _Thread_MP_Extract_proxy()
Remove _Thread_queue_Extract_with_proxy() and move the proxy extraction to _Thread_MP_Extract_proxy(). Move similar code blocks of the previous caller of _Thread_queue_Extract_with_proxy() to helper functions. Update #4546.
Diffstat (limited to 'cpukit/include/rtems/score')
-rw-r--r--cpukit/include/rtems/score/objectdata.h2
-rw-r--r--cpukit/include/rtems/score/threadimpl.h27
-rw-r--r--cpukit/include/rtems/score/threadmp.h13
-rw-r--r--cpukit/include/rtems/score/threadqimpl.h18
4 files changed, 41 insertions, 19 deletions
diff --git a/cpukit/include/rtems/score/objectdata.h b/cpukit/include/rtems/score/objectdata.h
index 149498df9c..c7fb33ca5b 100644
--- a/cpukit/include/rtems/score/objectdata.h
+++ b/cpukit/include/rtems/score/objectdata.h
@@ -286,7 +286,7 @@ struct Objects_Information {
#if defined(RTEMS_MULTIPROCESSING)
/**
- * @brief This method is used by _Thread_queue_Extract_with_proxy().
+ * @brief This method is used by _Thread_MP_Extract_proxy().
*
* This member is statically initialized and read-only.
*/
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h
index 931de2c6be..dc41d28856 100644
--- a/cpukit/include/rtems/score/threadimpl.h
+++ b/cpukit/include/rtems/score/threadimpl.h
@@ -2690,5 +2690,32 @@ RTEMS_INLINE_ROUTINE void _Thread_Unpin(
#include <rtems/score/threadmp.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup RTEMSScoreThread
+ *
+ * @brief Removes the watchdog timer from the thread and lets the thread
+ * continue its execution.
+ *
+ * @param[in, out] the_thread is the thread.
+ */
+RTEMS_INLINE_ROUTINE void _Thread_Timer_remove_and_continue(
+ Thread_Control *the_thread
+)
+{
+ _Thread_Timer_remove( the_thread );
+#if defined(RTEMS_MULTIPROCESSING)
+ _Thread_MP_Extract_proxy( the_thread );
+#endif
+ _Thread_queue_Extract( the_thread );
+}
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* end of include file */
diff --git a/cpukit/include/rtems/score/threadmp.h b/cpukit/include/rtems/score/threadmp.h
index 6cc68e6320..e10661a573 100644
--- a/cpukit/include/rtems/score/threadmp.h
+++ b/cpukit/include/rtems/score/threadmp.h
@@ -98,6 +98,19 @@ Thread_Control *_Thread_MP_Find_proxy (
((_the_thread) == _MPCI_Receive_server_tcb)
/**
+ * @brief Extracts the proxy of the thread if necessary.
+ *
+ * This routine ensures that if there is a proxy for this thread on another
+ * node, it is also dealt with. A proxy is a data that is on the thread queue
+ * on the remote node and acts as a proxy for the local thread. If the local
+ * thread was waiting on a remote operation, then the remote side of the
+ * operation must be cleaned up.
+ *
+ * @param[in, out] the_thread is the thread to determine the proxy.
+ */
+void _Thread_MP_Extract_proxy( Thread_Control *the_thread );
+
+/**
* @brief Trees a proxy control block to the inactive chain of free proxy
* control blocks.
*/
diff --git a/cpukit/include/rtems/score/threadqimpl.h b/cpukit/include/rtems/score/threadqimpl.h
index 7e6f2665be..18317873c4 100644
--- a/cpukit/include/rtems/score/threadqimpl.h
+++ b/cpukit/include/rtems/score/threadqimpl.h
@@ -984,24 +984,6 @@ void _Thread_queue_Resume(
void _Thread_queue_Extract( Thread_Control *the_thread );
/**
- * @brief Extracts the_thread from the_thread_queue.
- *
- * This routine extracts the_thread from the_thread_queue
- * and ensures that if there is a proxy for this task on
- * another node, it is also dealt with. A proxy is a data
- * data that is on the thread queue on the remote node and
- * acts as a proxy for the local thread. If the local thread
- * was waiting on a remote operation, then the remote side
- * of the operation must be cleaned up.
- *
- * @param[in, out] the_thread The pointer to a thread control block that
- * is to be removed
- */
-void _Thread_queue_Extract_with_proxy(
- Thread_Control *the_thread
-);
-
-/**
* @brief Surrenders the thread queue previously owned by the thread to the
* first enqueued thread.
*