forked from Imagelibrary/rtems
pthread_codn_destroy: EBUSY case moved and uses Thread_queue_First
This commit is contained in:
@@ -256,14 +256,14 @@ int pthread_cond_destroy(
|
|||||||
return EINVAL;
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
|
if ( _Thread_queue_First( &the_cond->Wait_queue ) )
|
||||||
|
return EBUSY;
|
||||||
|
|
||||||
_Objects_Close(
|
_Objects_Close(
|
||||||
&_POSIX_Condition_variables_Information,
|
&_POSIX_Condition_variables_Information,
|
||||||
&the_cond->Object
|
&the_cond->Object
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( _Thread_queue_First( &the_cond->Wait_queue ) )
|
|
||||||
return EBUSY;
|
|
||||||
|
|
||||||
_POSIX_Condition_variables_Free( the_cond );
|
_POSIX_Condition_variables_Free( the_cond );
|
||||||
|
|
||||||
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
||||||
|
|||||||
@@ -256,14 +256,14 @@ int pthread_cond_destroy(
|
|||||||
return EINVAL;
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
|
if ( _Thread_queue_First( &the_cond->Wait_queue ) )
|
||||||
|
return EBUSY;
|
||||||
|
|
||||||
_Objects_Close(
|
_Objects_Close(
|
||||||
&_POSIX_Condition_variables_Information,
|
&_POSIX_Condition_variables_Information,
|
||||||
&the_cond->Object
|
&the_cond->Object
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( _Thread_queue_First( &the_cond->Wait_queue ) )
|
|
||||||
return EBUSY;
|
|
||||||
|
|
||||||
_POSIX_Condition_variables_Free( the_cond );
|
_POSIX_Condition_variables_Free( the_cond );
|
||||||
|
|
||||||
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user