[PATCH 31/45] score: Remove Giant lock in rtems_clock_tick()

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


Update #2307.
---
 cpukit/rtems/src/clocktick.c   | 11 +----------
 testsuites/sptests/sp37/init.c |  4 ----
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c
index a026b44..fe49e9a 100644
--- a/cpukit/rtems/src/clocktick.c
+++ b/cpukit/rtems/src/clocktick.c
@@ -26,23 +26,14 @@
 
 rtems_status_code rtems_clock_tick( void )
 {
-#if defined( RTEMS_SMP )
-  _Thread_Disable_dispatch();
-#endif
-
   _TOD_Tickle_ticks();
 
   _Watchdog_Tickle_ticks();
 
   _Scheduler_Tick();
 
-#if defined( RTEMS_SMP )
-  _Thread_Enable_dispatch();
-#else
-  if ( _Thread_Is_context_switch_necessary() &&
-       _Thread_Dispatch_is_enabled() )
+  if ( _Thread_Dispatch_is_enabled() )
     _Thread_Dispatch();
-#endif
 
   return RTEMS_SUCCESSFUL;
 }
diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c
index aaaf684..647485e 100644
--- a/testsuites/sptests/sp37/init.c
+++ b/testsuites/sptests/sp37/init.c
@@ -431,11 +431,7 @@ rtems_timer_service_routine test_unblock_task(
   _Thread_Disable_dispatch();
   status = rtems_task_resume( blocked_task_id );
   _Thread_Unnest_dispatch();
-#if defined( RTEMS_SMP )
-  directive_failed_with_level( status, "rtems_task_resume", 1 );
-#else
   directive_failed( status, "rtems_task_resume" );
-#endif
 }
 
 rtems_task Init(
-- 
1.8.4.5




More information about the devel mailing list