From bbc93c119c72f981b5091fa06aea5e7369b79a59 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 26 Apr 2021 13:36:46 +0200 Subject: Return status code for _Thread_Start() This avoids having conditional statements to get the API-specific status code. --- cpukit/score/src/threadstart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/threadstart.c b/cpukit/score/src/threadstart.c index e75c536a2c..8c1732a35a 100644 --- a/cpukit/score/src/threadstart.c +++ b/cpukit/score/src/threadstart.c @@ -24,7 +24,7 @@ #include #include -bool _Thread_Start( +Status_Control _Thread_Start( Thread_Control *the_thread, const Thread_Entry_information *entry, ISR_lock_Context *lock_context @@ -36,7 +36,7 @@ bool _Thread_Start( if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_State_release( the_thread, lock_context ); - return false; + return STATUS_INCORRECT_STATE; } the_thread->Start.Entry = *entry; @@ -49,5 +49,5 @@ bool _Thread_Start( _User_extensions_Thread_start( the_thread ); _Thread_Dispatch_enable( cpu_self ); - return true; + return STATUS_SUCCESSFUL; } -- cgit v1.2.3