Added call to _Thread_Enable_dispatch() and did some cleanup.

This commit is contained in:
Joel Sherrill
1999-11-10 20:37:01 +00:00
parent 74db82a343
commit 72719d29fc
2 changed files with 18 additions and 4 deletions

View File

@@ -52,6 +52,12 @@
* error code - if unsuccessful * error code - if unsuccessful
*/ */
#if defined(RTEMS_MULTIPROCESSING)
#define SEND_OBJECT_WAS_DELETED _Semaphore_MP_Send_object_was_deleted
#else
#define SEND_OBJECT_WAS_DELETED NULL
#endif
rtems_status_code rtems_semaphore_flush( rtems_status_code rtems_semaphore_flush(
Objects_Id id Objects_Id id
) )
@@ -75,16 +81,17 @@ rtems_status_code rtems_semaphore_flush(
if ( _Attributes_Is_binary_semaphore(the_semaphore->attribute_set) ) { if ( _Attributes_Is_binary_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush( _CORE_mutex_Flush(
&the_semaphore->Core_control.mutex, &the_semaphore->Core_control.mutex,
NULL, SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
); );
} else { } else {
_CORE_semaphore_Flush( _CORE_semaphore_Flush(
&the_semaphore->Core_control.semaphore, &the_semaphore->Core_control.semaphore,
NULL, SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
); );
} }
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }

View File

@@ -52,6 +52,12 @@
* error code - if unsuccessful * error code - if unsuccessful
*/ */
#if defined(RTEMS_MULTIPROCESSING)
#define SEND_OBJECT_WAS_DELETED _Semaphore_MP_Send_object_was_deleted
#else
#define SEND_OBJECT_WAS_DELETED NULL
#endif
rtems_status_code rtems_semaphore_flush( rtems_status_code rtems_semaphore_flush(
Objects_Id id Objects_Id id
) )
@@ -75,16 +81,17 @@ rtems_status_code rtems_semaphore_flush(
if ( _Attributes_Is_binary_semaphore(the_semaphore->attribute_set) ) { if ( _Attributes_Is_binary_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush( _CORE_mutex_Flush(
&the_semaphore->Core_control.mutex, &the_semaphore->Core_control.mutex,
NULL, SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
); );
} else { } else {
_CORE_semaphore_Flush( _CORE_semaphore_Flush(
&the_semaphore->Core_control.semaphore, &the_semaphore->Core_control.semaphore,
NULL, SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
); );
} }
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }