X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftimer.cpp;h=d87824704633ab61fbe54f9178de333990904a17;hb=0038180de36c422cfaeade1145fa9fbc9436b8ad;hp=243b562190d12e3656e438c561f25aba4bc8215b;hpb=8b75cd779ffe332281fec189cdf808e4ee452572;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/timer.cpp b/src/bin/lttng-sessiond/timer.cpp index 243b56219..d87824704 100644 --- a/src/bin/lttng-sessiond/timer.cpp +++ b/src/bin/lttng-sessiond/timer.cpp @@ -233,25 +233,25 @@ end: /* * Call with session and session_list locks held. */ -int timer_session_rotation_pending_check_stop(struct ltt_session *session) +int timer_session_rotation_pending_check_stop(ltt_session &session) { int ret; - LTTNG_ASSERT(session); - LTTNG_ASSERT(session->rotation_pending_check_timer_enabled); + LTTNG_ASSERT(session.rotation_pending_check_timer_enabled); - DBG("Disabling session rotation pending check timer on session %" PRIu64, session->id); - ret = timer_stop(&session->rotation_pending_check_timer, + DBG("Disabling session rotation pending check timer on session %" PRIu64, session.id); + ret = timer_stop(&session.rotation_pending_check_timer, LTTNG_SESSIOND_SIG_PENDING_ROTATION_CHECK); if (ret == -1) { ERR("Failed to stop rotate_pending_check timer"); } else { - session->rotation_pending_check_timer_enabled = false; + session.rotation_pending_check_timer_enabled = false; /* * The timer's reference to the session can be released safely. */ - session_put(session); + session_put(&session); } + return ret; } @@ -379,13 +379,15 @@ static void *thread_timer(void *data) struct ltt_session *session = (struct ltt_session *) info.si_value.sival_ptr; - rotation_thread_enqueue_job(ctx->rotation_thread_job_queue, - ROTATION_THREAD_JOB_TYPE_CHECK_PENDING_ROTATION, - session); + rotation_thread_enqueue_job( + ctx->rotation_thread_job_queue, + lttng::sessiond::rotation_thread_job_type::CHECK_PENDING_ROTATION, + session); } else if (signr == LTTNG_SESSIOND_SIG_SCHEDULED_ROTATION) { - rotation_thread_enqueue_job(ctx->rotation_thread_job_queue, - ROTATION_THREAD_JOB_TYPE_SCHEDULED_ROTATION, - (struct ltt_session *) info.si_value.sival_ptr); + rotation_thread_enqueue_job( + ctx->rotation_thread_job_queue, + lttng::sessiond::rotation_thread_job_type::SCHEDULED_ROTATION, + (struct ltt_session *) info.si_value.sival_ptr); /* * The scheduled periodic rotation timer is not in * "one-shot" mode. The reference to the session is not