summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-10 20:37:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-10 20:37:01 +0000
commit72719d29fc63c433c2fe9db28722789d47847e40 (patch)
tree12ced026f044d2324b1e4c0de9dd4660fa5c57ef /cpukit/rtems
parentrtems_semaphore_flush test from Eric Norum <eric@cls.usask.ca>. (diff)
downloadrtems-72719d29fc63c433c2fe9db28722789d47847e40.tar.bz2
Added call to _Thread_Enable_dispatch() and did some cleanup.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/semflush.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
index c58480c734..2c0c4f5073 100644
--- a/cpukit/rtems/src/semflush.c
+++ b/cpukit/rtems/src/semflush.c
@@ -52,6 +52,12 @@
* 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(
Objects_Id id
)
@@ -75,16 +81,17 @@ rtems_status_code rtems_semaphore_flush(
if ( _Attributes_Is_binary_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
&the_semaphore->Core_control.mutex,
- NULL,
+ SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
&the_semaphore->Core_control.semaphore,
- NULL,
+ SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
+ _Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}