From 029877282edb8aa7a2095702742ce95c8246729e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 29 Jun 2016 15:33:26 +0200 Subject: score: Avoid atomic fences for thread wait flags The use of atomic fences is brittle and may break due to changes in different areas which is hard to manage. --- cpukit/score/src/threadtimeout.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'cpukit/score/src/threadtimeout.c') diff --git a/cpukit/score/src/threadtimeout.c b/cpukit/score/src/threadtimeout.c index 9b5cfa637d..a2ba61f9e7 100644 --- a/cpukit/score/src/threadtimeout.c +++ b/cpukit/score/src/threadtimeout.c @@ -54,15 +54,9 @@ void _Thread_Timeout( Watchdog_Control *watchdog ) _Thread_Do_timeout( the_thread ); - /* - * This fence is only necessary for the events, see _Event_Seize(). The - * thread queues use the thread lock for synchronization. - */ - _Atomic_Fence( ATOMIC_ORDER_RELEASE ); - wait_class = wait_flags & THREAD_WAIT_CLASS_MASK; ready_again = wait_class | THREAD_WAIT_STATE_READY_AGAIN; - success = _Thread_Wait_flags_try_change_critical( + success = _Thread_Wait_flags_try_change_release( the_thread, wait_class | THREAD_WAIT_STATE_INTEND_TO_BLOCK, ready_again -- cgit v1.2.3