summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-29 16:05:32 +0200
committerTom Gundersen <teg@jklm.no>2015-04-29 17:08:31 +0200
commit7dfbe2e3fc0215b49d8202a32beb6b1aae08c4e4 (patch)
treea4916772973c4a6053f5eec7492b273304e473e5 /src/core/manager.c
parent77cfd1139cd116e9761aacfaf8c3cde71fc5d058 (diff)
core: annotate event sources
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index f13dad538f..0c94e9ef10 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -103,6 +103,8 @@ static void manager_watch_jobs_in_progress(Manager *m) {
CLOCK_MONOTONIC,
next, 0,
manager_dispatch_jobs_in_progress, m);
+
+ (void) sd_event_source_set_description(m->jobs_in_progress_event_source, "manager-jobs-in-progress");
}
#define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
@@ -278,6 +280,8 @@ static int manager_check_ask_password(Manager *m) {
return -errno;
}
+ (void) sd_event_source_set_description(m->ask_password_event_source, "manager-ask-password");
+
/* Queries might have been added meanwhile... */
manager_dispatch_ask_password_fd(m->ask_password_event_source,
m->ask_password_inotify_fd, EPOLLIN, m);
@@ -301,6 +305,8 @@ static int manager_watch_idle_pipe(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to watch idle pipe: %m");
+ (void) sd_event_source_set_description(m->idle_pipe_event_source, "manager-idle-pipe");
+
return 0;
}
@@ -343,6 +349,8 @@ static int manager_setup_time_change(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to create time change event source: %m");
+ (void) sd_event_source_set_description(m->time_change_event_source, "manager-time-change");
+
log_debug("Set up TFD_TIMER_CANCEL_ON_SET timerfd.");
return 0;
@@ -453,6 +461,8 @@ static int manager_setup_signals(Manager *m) {
if (r < 0)
return r;
+ (void) sd_event_source_set_description(m->signal_event_source, "manager-signal");
+
/* Process signals a bit earlier than the rest of things, but
* later than notify_fd processing, so that the notify
* processing can still figure out to which process/service a
@@ -593,6 +603,8 @@ int manager_new(SystemdRunningAs running_as, bool test_run, Manager **_m) {
if (r < 0)
goto fail;
+ (void) sd_event_source_set_description(m->run_queue_event_source, "manager-run-queue");
+
r = manager_setup_signals(m);
if (r < 0)
goto fail;
@@ -691,6 +703,8 @@ static int manager_setup_notify(Manager *m) {
r = sd_event_source_set_priority(m->notify_event_source, -7);
if (r < 0)
return log_error_errno(r, "Failed to set priority of notify event source: %m");
+
+ (void) sd_event_source_set_description(m->notify_event_source, "manager-notify");
}
return 0;