[PATCH 10/11] rtems: Return status in _Event_Surrender()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue May 3 12:49:46 UTC 2016


---
 cpukit/rtems/include/rtems/rtems/eventimpl.h | 2 +-
 cpukit/rtems/src/eventsend.c                 | 3 +--
 cpukit/rtems/src/eventsurrender.c            | 4 +++-
 cpukit/rtems/src/systemeventsend.c           | 3 +--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cpukit/rtems/include/rtems/rtems/eventimpl.h b/cpukit/rtems/include/rtems/rtems/eventimpl.h
index f4850d2..df488e1 100644
--- a/cpukit/rtems/include/rtems/rtems/eventimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/eventimpl.h
@@ -56,7 +56,7 @@ void _Event_Seize(
   ISR_lock_Context  *lock_context
 );
 
-void _Event_Surrender(
+rtems_status_code _Event_Surrender(
   Thread_Control    *the_thread,
   rtems_event_set    event_in,
   Event_Control     *event,
diff --git a/cpukit/rtems/src/eventsend.c b/cpukit/rtems/src/eventsend.c
index 23eed74..a6476a2 100644
--- a/cpukit/rtems/src/eventsend.c
+++ b/cpukit/rtems/src/eventsend.c
@@ -37,14 +37,13 @@ rtems_status_code rtems_event_send(
   switch ( location ) {
     case OBJECTS_LOCAL:
       api = thread->API_Extensions[ THREAD_API_RTEMS ];
-      _Event_Surrender(
+      sc = _Event_Surrender(
         thread,
         event_in,
         &api->Event,
         THREAD_WAIT_CLASS_EVENT,
         &lock_context
       );
-      sc = RTEMS_SUCCESSFUL;
       break;
 #ifdef RTEMS_MULTIPROCESSING
     case OBJECTS_REMOTE:
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index 7c4fe2e..576670b 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -65,7 +65,7 @@ static bool _Event_Is_satisfied(
     && ( *seized_events == event_condition || _Options_Is_any( option_set ) );
 }
 
-void _Event_Surrender(
+rtems_status_code _Event_Surrender(
   Thread_Control    *the_thread,
   rtems_event_set    event_in,
   Event_Control     *event,
@@ -128,4 +128,6 @@ void _Event_Surrender(
   } else {
     _Thread_Lock_release_default( the_thread, lock_context );
   }
+
+  return RTEMS_SUCCESSFUL;
 }
diff --git a/cpukit/rtems/src/systemeventsend.c b/cpukit/rtems/src/systemeventsend.c
index 3c821c9..5b2116c 100644
--- a/cpukit/rtems/src/systemeventsend.c
+++ b/cpukit/rtems/src/systemeventsend.c
@@ -43,14 +43,13 @@ rtems_status_code rtems_event_system_send(
   switch ( location ) {
     case OBJECTS_LOCAL:
       api = thread->API_Extensions[ THREAD_API_RTEMS ];
-      _Event_Surrender(
+      sc = _Event_Surrender(
         thread,
         event_in,
         &api->System_event,
         THREAD_WAIT_CLASS_SYSTEM_EVENT,
         &lock_context
       );
-      sc = RTEMS_SUCCESSFUL;
       break;
 #ifdef RTEMS_MULTIPROCESSING
     case OBJECTS_REMOTE:
-- 
1.8.4.5




More information about the devel mailing list