summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadtimeout.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-29 15:33:26 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-30 07:57:44 +0200
commit029877282edb8aa7a2095702742ce95c8246729e (patch)
treeb1fbd380bac4071d05712957f9d03c6cc7521299 /cpukit/score/src/threadtimeout.c
parentscore: Fix thread lock on SMP configurations (diff)
downloadrtems-029877282edb8aa7a2095702742ce95c8246729e.tar.bz2
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.
Diffstat (limited to 'cpukit/score/src/threadtimeout.c')
-rw-r--r--cpukit/score/src/threadtimeout.c8
1 files changed, 1 insertions, 7 deletions
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