Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / libcaptive / ke / event.c
index 29f8321..1ec3b44 100644 (file)
@@ -53,6 +53,7 @@ VOID KeInitializeEvent(PKEVENT Event,EVENT_TYPE Type,BOOLEAN State)
  * Sets the signal state of @Event. Currently libcaptive doesn't use multithreading
  * and thus this function will just set the @Event's internal state and it returns
  * the previous value.
+ * See also KeResetEvent(), KeClearEvent().
  *
  * Returns: Previous signal state value of @Event.
  */
@@ -71,6 +72,7 @@ LONG KeSetEvent(PKEVENT Event,KPRIORITY Increment,BOOLEAN Wait)
  * %NULL value is forbidden.
  *
  * Clears the signal state of @Event. See also KeSetEvent().
+ * Use KeClearEvent() if you do not need the previous signal state of @Event.
  *
  * Returns: Previous signal state value of @Event.
  */
@@ -80,3 +82,19 @@ LONG KeResetEvent(PKEVENT Event)
 
        return InterlockedExchange(&(Event->Header.SignalState),0);
 }
+
+
+/**
+ * KeClearEvent:
+ * @Event: Event to clear its signal state off.
+ * %NULL value is forbidden.
+ *
+ * Clears the signal state of @Event. See also KeSetEvent().
+ * Use KeResetEvent() if you need the previous signal state of @Event.
+ */
+VOID KeClearEvent(PKEVENT Event)
+{
+       g_return_if_fail(Event!=NULL);
+
+       Event->Header.SignalState=FALSE;
+}