diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-16 10:44:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-16 10:44:00 +0200 |
commit | 57c676c626268aa8457e1de81921b68418a32ff5 (patch) | |
tree | e68175d87f99937cbc22b2decab44ccf4892f258 | |
parent | psxtests/psx12: Use and print proper rounded ms (diff) | |
download | rtems-57c676c626268aa8457e1de81921b68418a32ff5.tar.bz2 |
rtems: Fix rtems_semaphore_create()
Destroy the thread queue in case of a priority ceiling violation,
otherwise the SMP profiling data gets corrupted.
-rw-r--r-- | cpukit/rtems/src/semcreate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c index 0f8bdcbbe5..bb1c6b4e61 100644 --- a/cpukit/rtems/src/semcreate.c +++ b/cpukit/rtems/src/semcreate.c @@ -173,6 +173,10 @@ rtems_status_code rtems_semaphore_create( executing, &queue_context ); + + if ( status != STATUS_SUCCESSFUL ) { + _Thread_queue_Destroy( &the_semaphore->Core_control.Wait_queue ); + } } else { status = STATUS_SUCCESSFUL; } |