summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/semimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-23 13:37:59 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-26 21:44:31 +0200
commitdce487912d98835b8168e755b60514f5a8592b27 (patch)
tree8778547fbb0f2dbb07bb6a83f28d3f4464924141 /cpukit/rtems/include/rtems/rtems/semimpl.h
parentposix: Fix sem_init() with too large initial value (diff)
downloadrtems-dce487912d98835b8168e755b60514f5a8592b27.tar.bz2
score: Add Status_Control for all APIs
Unify the status codes of the Classic and POSIX API to use the new enum Status_Control. This eliminates the Thread_Control::Wait::timeout_code field and the timeout parameter of _Thread_queue_Enqueue_critical() and _MPCI_Send_request_packet(). It gets rid of the status code translation tables and instead uses simple bit operations to get the status for a particular API. This enables translation of status code constants at compile time. Add _Thread_Wait_get_status() to avoid direct access of thread internal data structures.
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/semimpl.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/semimpl.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/semimpl.h b/cpukit/rtems/include/rtems/rtems/semimpl.h
index c23bef905a..21e16e99d0 100644
--- a/cpukit/rtems/include/rtems/rtems/semimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/semimpl.h
@@ -32,82 +32,6 @@ extern "C" {
*/
extern Objects_Information _Semaphore_Information;
-extern const rtems_status_code
- _Semaphore_Translate_core_mutex_return_code_[];
-
-extern const rtems_status_code
- _Semaphore_Translate_core_semaphore_return_code_[];
-
-/**
- * @brief Semaphore Translate Core Mutex Return Code
- *
- * This function returns a RTEMS status code based on the mutex
- * status code specified.
- *
- * @param[in] status is the mutex status code to translate
- *
- * @retval translated RTEMS status code
- */
-RTEMS_INLINE_ROUTINE rtems_status_code
-_Semaphore_Translate_core_mutex_return_code(
- uint32_t status
-)
-{
- /*
- * If this thread is blocking waiting for a result on a remote operation.
- */
- #if defined(RTEMS_MULTIPROCESSING)
- if ( _Thread_Is_proxy_blocking(status) )
- return RTEMS_PROXY_BLOCKING;
- #endif
-
- /*
- * Internal consistency check for bad status from SuperCore
- */
- #if defined(RTEMS_DEBUG)
- if ( status > CORE_MUTEX_STATUS_LAST )
- return RTEMS_INTERNAL_ERROR;
- #endif
- return _Semaphore_Translate_core_mutex_return_code_[status];
-}
-
-#if defined(RTEMS_SMP)
-RTEMS_INLINE_ROUTINE rtems_status_code
-_Semaphore_Translate_MRSP_status_code( MRSP_Status mrsp_status )
-{
- return (rtems_status_code) mrsp_status;
-}
-#endif
-
-/**
- * @brief Semaphore Translate Core Semaphore Return Code
- *
- * This function returns a RTEMS status code based on the semaphore
- * status code specified.
- *
- * @param[in] status is the semaphore status code to translate
- *
- * @retval translated RTEMS status code
- */
-RTEMS_INLINE_ROUTINE rtems_status_code
-_Semaphore_Translate_core_semaphore_return_code(
- uint32_t status
-)
-{
- #if defined(RTEMS_MULTIPROCESSING)
- if ( _Thread_Is_proxy_blocking(status) )
- return RTEMS_PROXY_BLOCKING;
- #endif
- /*
- * Internal consistency check for bad status from SuperCore
- */
- #if defined(RTEMS_DEBUG)
- if ( status > CORE_SEMAPHORE_STATUS_LAST )
- return RTEMS_INTERNAL_ERROR;
- #endif
- return _Semaphore_Translate_core_semaphore_return_code_[status];
-}
-
/**
* @brief Allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.