[rtems commit] mpci: Fix blocking proxy status
Sebastian Huber
sebh at rtems.org
Thu Jan 2 10:36:13 UTC 2020
Module: rtems
Branch: master
Commit: f74e806d79e2f6611f20c507d8913366e213cc18
Changeset: http://git.rtems.org/rtems/commit/?id=f74e806d79e2f6611f20c507d8913366e213cc18
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jan 2 11:30:33 2020 +0100
mpci: Fix blocking proxy status
Remove THREAD_STATUS_PROXY_BLOCKING and replace it with
STATUS_PROXY_BLOCKING.
---
cpukit/include/rtems/score/status.h | 3 +++
cpukit/include/rtems/score/threadimpl.h | 23 -----------------------
cpukit/score/src/threadmp.c | 2 +-
3 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/cpukit/include/rtems/score/status.h b/cpukit/include/rtems/score/status.h
index 5b154bb..3400255 100644
--- a/cpukit/include/rtems/score/status.h
+++ b/cpukit/include/rtems/score/status.h
@@ -39,6 +39,7 @@ typedef enum {
STATUS_CLASSIC_NOT_DEFINED = 11,
STATUS_CLASSIC_NOT_OWNER_OF_RESOURCE = 23,
STATUS_CLASSIC_OBJECT_WAS_DELETED = 7,
+ STATUS_CLASSIC_PROXY_BLOCKING = 29,
STATUS_CLASSIC_RESOURCE_IN_USE = 12,
STATUS_CLASSIC_SUCCESSFUL = 0,
STATUS_CLASSIC_TIMEOUT = 6,
@@ -106,6 +107,8 @@ typedef enum {
STATUS_BUILD( STATUS_CLASSIC_NOT_OWNER_OF_RESOURCE, EPERM ),
STATUS_OBJECT_WAS_DELETED =
STATUS_BUILD( STATUS_CLASSIC_OBJECT_WAS_DELETED, EINVAL ),
+ STATUS_PROXY_BLOCKING =
+ STATUS_BUILD( STATUS_CLASSIC_PROXY_BLOCKING, EINVAL ),
STATUS_RESOURCE_IN_USE =
STATUS_BUILD( STATUS_CLASSIC_RESOURCE_IN_USE, EBUSY ),
STATUS_RESULT_TOO_LARGE =
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h
index 2e41b80..6989beb 100644
--- a/cpukit/include/rtems/score/threadimpl.h
+++ b/cpukit/include/rtems/score/threadimpl.h
@@ -50,12 +50,6 @@ extern "C" {
*/
/**
- * The following structure contains the information necessary to manage
- * a thread which it is waiting for a resource.
- */
-#define THREAD_STATUS_PROXY_BLOCKING 0x1111111
-
-/**
* Self for the GNU Ada Run-Time
*/
extern void *rtems_ada_self;
@@ -1053,23 +1047,6 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_null (
}
/**
- * @brief Checks if proxy is blocking.
- *
- * status which indicates that a proxy is blocking, and false otherwise.
- *
- * @param code The code for the verification.
- *
- * @retval true Status indicates that a proxy is blocking.
- * @retval false Status indicates that a proxy is not blocking.
- */
-RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking (
- uint32_t code
-)
-{
- return (code == THREAD_STATUS_PROXY_BLOCKING);
-}
-
-/**
* @brief Gets the maximum number of internal threads.
*
* @return The maximum number of internal threads.
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
index e60aeed..fffd4de 100644
--- a/cpukit/score/src/threadmp.c
+++ b/cpukit/score/src/threadmp.c
@@ -139,7 +139,7 @@ Thread_Control *_Thread_MP_Allocate_proxy (
receive_packet = _MPCI_Receive_server_tcb->receive_packet;
source_tid = receive_packet->source_tid;
- executing->Wait.return_code = THREAD_STATUS_PROXY_BLOCKING;
+ executing->Wait.return_code = STATUS_PROXY_BLOCKING;
the_proxy->receive_packet = receive_packet;
the_proxy->Object.id = source_tid;
More information about the vc
mailing list