From dce487912d98835b8168e755b60514f5a8592b27 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 May 2016 13:37:59 +0200 Subject: 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. --- cpukit/score/src/threadrestart.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cpukit/score/src/threadrestart.c') diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 52d68de69a..f9636e61c7 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -443,17 +443,16 @@ static void _Thread_Finalize_life_change( } void _Thread_Join( - Thread_Control *the_thread, - States_Control waiting_for_join, - Thread_Control *executing, - ISR_lock_Context *lock_context + Thread_Control *the_thread, + States_Control waiting_for_join, + Thread_Control *executing, + ISR_lock_Context *lock_context ) { _Assert( the_thread != executing ); _Assert( _Thread_State_is_owner( the_thread ) ); #if defined(RTEMS_POSIX_API) - executing->Wait.return_code = 0; executing->Wait.return_argument = NULL; #endif @@ -463,7 +462,6 @@ void _Thread_Join( executing, waiting_for_join, WATCHDOG_NO_TIMEOUT, - 0, lock_context ); } -- cgit v1.2.3