Imported Upstream version 2.6.0
[debian/amanda] / common-src / event.h
index 367f3b513e04085fdd87f869bba6b08066079511..402d899c8e1f0a418bc50d839b16f794e1423d94 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: event.h,v 1.6 2005/11/30 22:35:11 martinea Exp $
+ * $Id: event.h,v 1.9 2006/06/16 10:55:05 martinea Exp $
  */
 #ifndef EVENT_H
 #define EVENT_H
@@ -47,6 +47,7 @@ typedef struct event_handle event_handle_t;
  * of event we are registering.  This is hopefully wide enough that
  * callers can cast pointers to it and keep the value untruncated and
  * unique.
+ * FIXME: THIS IS NOT 64-BIT CLEAN!
  */
 typedef        unsigned long event_id_t;
 
@@ -66,7 +67,7 @@ typedef enum {
  * The function signature for functions that get called when an event
  * fires.
  */
-typedef void (*event_fn_t) P((void *));
+typedef void (*event_fn_t)(void *);
 
 /*
  * Register an event handler.
@@ -82,23 +83,27 @@ typedef void (*event_fn_t) P((void *));
  * count on the time events being too accurate.  They depend on the
  * caller calling event_loop() often enough.
  */
-event_handle_t *event_register P((event_id_t, event_type_t,
-    event_fn_t, void *));
+event_handle_t *event_register(event_id_t, event_type_t, event_fn_t, void *);
 
 /*
  * Release an event handler.
  */
-void event_release P((event_handle_t *));
+void event_release(event_handle_t *);
 
 /*
  * Wake up all EV_WAIT events waiting on a specific id
  */
-int event_wakeup P((event_id_t));
+int event_wakeup(event_id_t);
+
+/*
+ * Block until the event is terminated.
+ */
+int event_wait(event_handle_t *);
 
 /*
  * Process events.  If the argument is nonzero, then the loop does
  * not block.
  */
-void event_loop P((const int));
+void event_loop(const int);
 
 #endif /* EVENT_H */