[PATCH 38/45] rtems: Avoid Giant lock for events

Sebastian Huber sebastian.huber at embedded-brains.de
Fri May 15 11:41:38 UTC 2015


---
 cpukit/rtems/src/eventseize.c     | 2 --
 cpukit/rtems/src/eventsurrender.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 6611a8d..61727bc 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -86,7 +86,6 @@ void _Event_Seize(
 
   cpu_self = _Thread_Dispatch_disable_critical();
   _Thread_Lock_release_default( executing, lock_context );
-  _Giant_Acquire( cpu_self );
 
   if ( ticks ) {
     _Thread_Wait_set_timeout_code( executing, RTEMS_TIMEOUT );
@@ -111,6 +110,5 @@ void _Event_Seize(
     _Thread_Unblock( executing );
   }
 
-  _Giant_Release( cpu_self );
   _Thread_Dispatch_enable( cpu_self );
 }
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index b740721..d488141 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -109,12 +109,10 @@ void _Event_Surrender(
 
     cpu_self = _Thread_Dispatch_disable_critical();
     _Thread_Lock_release_default( the_thread, lock_context );
-    _Giant_Acquire( cpu_self );
 
     _Watchdog_Remove_ticks( &the_thread->Timer );
     _Thread_Unblock( the_thread );
 
-    _Giant_Release( cpu_self );
     _Thread_Dispatch_enable( cpu_self );
   } else {
     _Thread_Lock_release_default( the_thread, lock_context );
-- 
1.8.4.5




More information about the devel mailing list