mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
event: rename sd_event_get() to sd_event_source_get_event()
This commit is contained in:
parent
2be441769f
commit
adcc4ca30d
@ -235,8 +235,6 @@ global:
|
||||
sd_event_source_ref;
|
||||
sd_event_source_unref;
|
||||
|
||||
sd_event_get;
|
||||
|
||||
sd_event_source_set_prepare;
|
||||
sd_event_source_get_pending;
|
||||
sd_event_source_get_priority;
|
||||
@ -254,6 +252,7 @@ global:
|
||||
sd_event_source_get_time_accuracy;
|
||||
sd_event_source_get_signal;
|
||||
sd_event_source_get_child_pid;
|
||||
sd_event_source_get_event;
|
||||
|
||||
/* sd-utf8 function */
|
||||
sd_utf8_is_valid;
|
||||
|
@ -984,7 +984,7 @@ _public_ sd_event_source* sd_event_source_unref(sd_event_source *s) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_public_ sd_event *sd_event_get(sd_event_source *s) {
|
||||
_public_ sd_event *sd_event_source_get_event(sd_event_source *s) {
|
||||
assert_return(s, NULL);
|
||||
|
||||
return s->event;
|
||||
|
@ -63,7 +63,7 @@ static int child_handler(sd_event_source *s, const siginfo_t *si, void *userdata
|
||||
|
||||
assert(userdata == INT_TO_PTR('f'));
|
||||
|
||||
assert_se(sd_event_request_quit(sd_event_get(s)) >= 0);
|
||||
assert_se(sd_event_request_quit(sd_event_source_get_event(s)) >= 0);
|
||||
sd_event_source_unref(s);
|
||||
|
||||
return 1;
|
||||
@ -91,7 +91,7 @@ static int signal_handler(sd_event_source *s, const struct signalfd_siginfo *si,
|
||||
if (pid == 0)
|
||||
_exit(0);
|
||||
|
||||
assert_se(sd_event_add_child(sd_event_get(s), pid, WEXITED, child_handler, INT_TO_PTR('f'), &p) >= 0);
|
||||
assert_se(sd_event_add_child(sd_event_source_get_event(s), pid, WEXITED, child_handler, INT_TO_PTR('f'), &p) >= 0);
|
||||
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
|
||||
|
||||
sd_event_source_unref(s);
|
||||
@ -112,7 +112,7 @@ static int defer_handler(sd_event_source *s, void *userdata) {
|
||||
assert_se(sigemptyset(&ss) >= 0);
|
||||
assert_se(sigaddset(&ss, SIGUSR1) >= 0);
|
||||
assert_se(sigprocmask(SIG_BLOCK, &ss, NULL) >= 0);
|
||||
assert_se(sd_event_add_signal(sd_event_get(s), SIGUSR1, signal_handler, INT_TO_PTR('e'), &p) >= 0);
|
||||
assert_se(sd_event_add_signal(sd_event_source_get_event(s), SIGUSR1, signal_handler, INT_TO_PTR('e'), &p) >= 0);
|
||||
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
|
||||
raise(SIGUSR1);
|
||||
|
||||
@ -131,7 +131,7 @@ static int time_handler(sd_event_source *s, uint64_t usec, void *userdata) {
|
||||
if (do_quit) {
|
||||
sd_event_source *p;
|
||||
|
||||
assert_se(sd_event_add_defer(sd_event_get(s), defer_handler, INT_TO_PTR('d'), &p) >= 0);
|
||||
assert_se(sd_event_add_defer(sd_event_source_get_event(s), defer_handler, INT_TO_PTR('d'), &p) >= 0);
|
||||
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
|
||||
} else {
|
||||
assert(!got_c);
|
||||
|
@ -287,7 +287,7 @@ static int traffic_cb(sd_event_source *s, int fd, uint32_t revents, void *userda
|
||||
if (c->client_fd == -1 && c->client_to_server_buffer_full <= 0)
|
||||
goto quit;
|
||||
|
||||
r = connection_enable_event_sources(c, sd_event_get(s));
|
||||
r = connection_enable_event_sources(c, sd_event_source_get_event(s));
|
||||
if (r < 0)
|
||||
goto quit;
|
||||
|
||||
@ -373,7 +373,7 @@ static int connect_cb(sd_event_source *s, int fd, uint32_t revents, void *userda
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
r = connection_enable_event_sources(c, sd_event_get(s));
|
||||
r = connection_enable_event_sources(c, sd_event_source_get_event(s));
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
@ -477,7 +477,7 @@ static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdat
|
||||
getpeername_pretty(nfd, &peer);
|
||||
log_debug("New connection from %s", strna(peer));
|
||||
|
||||
r = add_connection_socket(context, sd_event_get(s), nfd);
|
||||
r = add_connection_socket(context, sd_event_source_get_event(s), nfd);
|
||||
if (r < 0) {
|
||||
close_nointr_nofail(fd);
|
||||
return r;
|
||||
|
@ -97,8 +97,6 @@ int sd_event_get_now_monotonic(sd_event *e, uint64_t *usec);
|
||||
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_event_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);
|
||||
@ -116,6 +114,7 @@ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec);
|
||||
int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec);
|
||||
int sd_event_source_get_signal(sd_event_source *s);
|
||||
int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid);
|
||||
sd_event *sd_event_source_get_event(sd_event_source *s);
|
||||
|
||||
_SD_END_DECLARATIONS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user