From f74e806d79e2f6611f20c507d8913366e213cc18 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 2 Jan 2020 11:30:33 +0100 Subject: [PATCH] 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 5b154bb207..34002559aa 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 2e41b80bd4..6989bebc34 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -49,12 +49,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 */ @@ -1052,23 +1046,6 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_null ( return ( the_thread == 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. * diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c index e60aeed893..fffd4de064 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;