summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spthreadq01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-25 16:35:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-27 10:55:30 +0200
commit1fcac5adc5ed38fb88ce4c6d24b2ca2e27e3cd10 (patch)
tree7d2fed265befa680902ff146acb3305a360f9116 /testsuites/sptests/spthreadq01
parentscore: Priority inherit thread queue operations (diff)
downloadrtems-1fcac5adc5ed38fb88ce4c6d24b2ca2e27e3cd10.tar.bz2
score: Turn thread lock into thread wait lock
The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
Diffstat (limited to 'testsuites/sptests/spthreadq01')
-rw-r--r--testsuites/sptests/spthreadq01/init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 85df6bd15c..afaa6527e0 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -68,13 +68,12 @@ static void wake_up_master(test_context *ctx)
static rtems_id get_wait_id(test_context *ctx)
{
- ISR_lock_Context lock_context;
- void *lock;
+ Thread_queue_Context queue_context;
rtems_id id;
- lock = _Thread_Lock_acquire(ctx->master, &lock_context);
+ _Thread_Wait_acquire(ctx->master, &queue_context);
id = _Thread_Wait_get_id(ctx->master);
- _Thread_Lock_release(lock, &lock_context);
+ _Thread_Wait_release(ctx->master, &queue_context);
return id;
}