#include <sys/syscall.h>
#include <setjmp.h>
-#include "local-def.h"
-
#include "afb-plugin.h"
#include "afb-req-itf.h"
#include "afb-poll-itf.h"
static const char plugin_register_function[] = "pluginRegister";
static const struct afb_poll_itf upoll_itf = {
- .update = (void*)upoll_update,
+ .on_readable = (void*)upoll_on_readable,
+ .on_writable = (void*)upoll_on_writable,
+ .on_hangup = (void*)upoll_on_hangup,
.close = (void*)upoll_close
};
free(context);
}
-static struct afb_poll itf_poll_open(int fd, uint32_t events, void (*process)(void *closure, int fd, uint32_t events), void *closure)
+static struct afb_poll itf_poll_open(int fd, void *closure)
{
struct afb_poll result;
- result.data = upoll_open(fd, events, process, closure);
+ result.data = upoll_open(fd, closure);
result.itf = result.data ? &upoll_itf : NULL;
return result;
}
timerset = 1; /* TODO: check statuses */
sevp.sigev_notify = SIGEV_THREAD_ID;
sevp.sigev_signo = SIGALRM;
+ sevp.sigev_value.sival_ptr = NULL;
#if defined(sigev_notify_thread_id)
sevp.sigev_notify_thread_id = (pid_t)syscall(SYS_gettid);
#else