aboutsummaryrefslogtreecommitdiff
path: root/src/event.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-12 12:05:27 -0400
committerDeterminant <[email protected]>2019-06-12 12:05:27 -0400
commit9f6460c7ab774d900f391345bbf3fac8617a3aa3 (patch)
tree94df1d667a3db95e8b92420c3fa361afb05a2888 /src/event.cpp
parentedc6e299727098c499fd1edae145a0462fee7807 (diff)
...
Diffstat (limited to 'src/event.cpp')
-rw-r--r--src/event.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/event.cpp b/src/event.cpp
index 9b6f432..4e5ce0b 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -12,8 +12,10 @@ void eventcontext_dispatch(eventcontext_t *self) { return self->dispatch(); }
void eventcontext_stop(eventcontext_t *self) { return self->stop(); }
-sigev_t *sigev_new(const eventcontext_t *self, sigev_callback_t callback) {
- return new sigev_t(*self, callback);
+sigev_t *sigev_new(const eventcontext_t *self, sigev_callback_t callback, void *userdata) {
+ return new sigev_t(*self, [=](int signum) {
+ callback(signum, userdata);
+ });
}
threadcall_t *threadcall_new(const eventcontext_t *ec) { return new threadcall_t(*ec); }
@@ -32,7 +34,7 @@ eventcontext_t *threadcall_get_ec(threadcall_t *self) {
void sigev_free(sigev_t *self) { delete self; }
-void sigev_add(sigev_t *self, int sig) { self->add(sig); }
+void sigev_add(sigev_t *self, int signum) { self->add(signum); }
timerev_t *timerev_new(const eventcontext_t *ec, timerev_callback_t callback, void *userdata) {
return new timerev_t(*ec, [=](salticidae::TimerEvent &ev) {