diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-25 16:35:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-27 10:55:30 +0200 |
commit | 1fcac5adc5ed38fb88ce4c6d24b2ca2e27e3cd10 (patch) | |
tree | 7d2fed265befa680902ff146acb3305a360f9116 /cpukit/libmisc/monitor | |
parent | score: Priority inherit thread queue operations (diff) | |
download | rtems-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 'cpukit/libmisc/monitor')
-rw-r--r-- | cpukit/libmisc/monitor/mon-task.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c index 96891e26de..eedba3e1d4 100644 --- a/cpukit/libmisc/monitor/mon-task.c +++ b/cpukit/libmisc/monitor/mon-task.c @@ -20,17 +20,16 @@ rtems_monitor_task_wait_info( Thread_Control *rtems_thread ) { - ISR_lock_Context lock_context; - void *lock; + Thread_queue_Context queue_context; - lock = _Thread_Lock_acquire( rtems_thread, &lock_context ); + _Thread_Wait_acquire( rtems_thread, &queue_context ); canonical_task->state = rtems_thread->current_state; canonical_task->wait_id = _Thread_Wait_get_id( rtems_thread ); canonical_task->wait_queue = rtems_thread->Wait.queue; canonical_task->wait_operations = rtems_thread->Wait.operations; - _Thread_Lock_release( lock, &lock_context ); + _Thread_Wait_release( rtems_thread, &queue_context ); } void |