rtems: Fix rtems_semaphore_create()

Destroy the thread queue in case of a priority ceiling violation,
otherwise the SMP profiling data gets corrupted.
This commit is contained in:
Sebastian Huber
2016-06-16 10:44:00 +02:00
parent 661e0e6377
commit 57c676c626

View File

@@ -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;
}