summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadqenqueue.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/threadqenqueue.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/threadqenqueue.c')
-rw-r--r--cpukit/score/src/threadqenqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index f014fc5781..3be7d58f16 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -101,7 +101,7 @@ void _Thread_queue_Enqueue_critical(
* as long as we are in the THREAD_QUEUE_INTEND_TO_BLOCK thread wait state,
* thus we have to cancel the blocking operation ourself if necessary.
*/
- success = _Thread_Wait_flags_try_change(
+ success = _Thread_Wait_flags_try_change_acquire(
the_thread,
THREAD_QUEUE_INTEND_TO_BLOCK,
THREAD_QUEUE_BLOCKED
@@ -144,7 +144,7 @@ bool _Thread_queue_Do_extract_locked(
* We must update the wait flags under protection of the current thread lock,
* otherwise a _Thread_Timeout() running on another processor may interfere.
*/
- success = _Thread_Wait_flags_try_change_critical(
+ success = _Thread_Wait_flags_try_change_release(
the_thread,
THREAD_QUEUE_INTEND_TO_BLOCK,
THREAD_QUEUE_READY_AGAIN