- /* Block signal for entire process, so only our thread processes it. */
- setmask(&mask);
- ret = pthread_sigmask(SIG_BLOCK, &mask, NULL);
- if (ret) {
- errno = ret;
- PERROR("pthread_sigmask");
- return -1;
- }
- return 0;
-}
-
-/*
- * Called with the rotation_timer_queue lock held.
- * Return true if the same timer job already exists in the queue, false if not.
- */
-static
-bool check_duplicate_timer_job(struct timer_thread_parameters *ctx,
- struct ltt_session *session, unsigned int signal)
-{
- bool ret = false;
- struct sessiond_rotation_timer *node;
-
- rcu_read_lock();
- cds_list_for_each_entry(node, &ctx->rotation_timer_queue->list, head) {
- if (node->session_id == session->id && node->signal == signal) {
- ret = true;
- goto end;
- }
+ DBG("Enabling scheduled rotation timer on session \"%s\" (%ui µs)", session->name,
+ interval_us);
+ ret = timer_start(&session->rotation_schedule_timer, session->id,
+ interval_us, LTTNG_SESSIOND_SIG_SCHEDULED_ROTATION,
+ /* one-shot */ false);
+ if (ret < 0) {
+ goto end;