diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-11 19:34:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-12 00:12:43 +0100 |
commit | afc6adb5ec7e73bc13156c43f52fb015cd80cc68 (patch) | |
tree | 999c8810a856d98826900c81c6bfb42fe4dc0ee7 /src/systemd | |
parent | d5e4ec5b1ee1e3f04a2cb0871490490eb47ef34a (diff) | |
download | systemd-afc6adb5ec7e73bc13156c43f52fb015cd80cc68.tar.gz |
bus: introduce concept of a "default" event loop per-thread and make use of it everywhere
Try to emphasize a bit that there should be a mapping between event
loops and threads, hence introduce a logic that there's one "default"
event loop for each thread, that can be queried via
"sd_event_default()".
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-event.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h index 8262e139ac..919b661d61 100644 --- a/src/systemd/sd-event.h +++ b/src/systemd/sd-event.h @@ -72,6 +72,8 @@ typedef int (*sd_defer_handler_t)(sd_event_source *s, void *userdata); typedef int (*sd_prepare_handler_t)(sd_event_source *s, void *userdata); typedef int (*sd_quit_handler_t)(sd_event_source *s, void *userdata); +int sd_event_default(sd_event **e); + int sd_event_new(sd_event **e); sd_event* sd_event_ref(sd_event *e); sd_event* sd_event_unref(sd_event *e); @@ -88,15 +90,17 @@ int sd_event_run(sd_event *e, uint64_t timeout); int sd_event_loop(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_quit(sd_event *e); int sd_event_request_quit(sd_event *e); int sd_event_get_now_realtime(sd_event *e, uint64_t *usec); int sd_event_get_now_monotonic(sd_event *e, uint64_t *usec); -sd_event *sd_event_get(sd_event_source *s); sd_event_source* sd_event_source_ref(sd_event_source *s); sd_event_source* sd_event_source_unref(sd_event_source *s); +sd_event *sd_event_get(sd_event_source *s); + int sd_event_source_set_prepare(sd_event_source *s, sd_prepare_handler_t callback); int sd_event_source_get_pending(sd_event_source *s); int sd_event_source_get_priority(sd_event_source *s, int *priority); |