[rtems commit] rtems: Avoid Giant lock for events

Sebastian Huber sebh at rtems.org
Wed May 20 07:12:03 UTC 2015


Module:    rtems
Branch:    master
Commit:    9eb056f8c106190c94f34b5152c4bbea7e6258a0
Changeset: http://git.rtems.org/rtems/commit/?id=9eb056f8c106190c94f34b5152c4bbea7e6258a0

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon May 11 15:11:00 2015 +0200

rtems: Avoid Giant lock for events

---

 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 981c7d2..a9290b3 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( lock_context );
   _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 a16d40e..1565860 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( lock_context );
     _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 );



More information about the vc mailing list