[systemd-commits] src/libsystemd src/systemd
Tom Gundersen
tomegun at kemper.freedesktop.org
Wed Aug 20 08:25:40 PDT 2014
src/libsystemd/libsystemd.sym.m4 | 1 +
src/libsystemd/sd-event/sd-event.c | 8 ++++++++
src/systemd/sd-event.h | 1 +
3 files changed, 10 insertions(+)
New commits:
commit 9b364545435d2b65fcf73519b3064bb7c28093b7
Author: Tom Gundersen <teg at jklm.no>
Date: Fri Aug 15 21:04:07 2014 +0200
sd-event: add API to access epoll_fd
This is a prerequisite for integrating sd-event into an external
event loop.
diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
index 415d89a..3fc9983 100644
--- a/src/libsystemd/libsystemd.sym.m4
+++ b/src/libsystemd/libsystemd.sym.m4
@@ -374,6 +374,7 @@ global:
sd_event_loop;
sd_event_exit;
sd_event_now;
+ sd_event_get_fd;
sd_event_get_state;
sd_event_get_tid;
sd_event_get_exit_code;
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 7917ab9..e062997 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -2361,6 +2361,14 @@ finish:
return r;
}
+_public_ int sd_event_get_fd(sd_event *e) {
+
+ assert_return(e, -EINVAL);
+ assert_return(!event_pid_changed(e), -ECHILD);
+
+ return e->epoll_fd;
+}
+
_public_ int sd_event_get_state(sd_event *e) {
assert_return(e, -EINVAL);
assert_return(!event_pid_changed(e), -ECHILD);
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h
index 5d9b3be..d96852a 100644
--- a/src/systemd/sd-event.h
+++ b/src/systemd/sd-event.h
@@ -90,6 +90,7 @@ int sd_event_exit(sd_event *e, int code);
int sd_event_now(sd_event *e, clockid_t clock, uint64_t *usec);
+int sd_event_get_fd(sd_event *e);
int sd_event_get_state(sd_event *e);
int sd_event_get_tid(sd_event *e, pid_t *tid);
int sd_event_get_exit_code(sd_event *e, int *code);
More information about the systemd-commits
mailing list