/* Am I the only one annoyed at how open has different includes than
* close/read/write? */
+/* NO. Ron. */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-static void handle_alarm(struct event_msg *ev_msg, unsigned int ev_type)
+static void handle_alarm(struct event_msg *ev_msg, unsigned int ev_type,
+ void *data)
{
assert(ev_type == EV_ALARM);
printf("\tAlarm fired!, id %d\n", ev_msg ? ev_msg->ev_arg2 : 55555);
}
/* Since we're doing SPAM_PUBLIC later, we actually don't need a big ev_q.
* But someone might copy/paste this and change a flag. */
- ev_handlers[EV_ALARM] = handle_alarm;
+ register_ev_handler(EV_ALARM, handle_alarm, 0);
if (!(ev_q = get_big_event_q())) {
perror("Failed ev_q"); /* it'll actually PF if malloc fails */
exit(-1);