X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.h;h=c7bca0c4b7937fc6e2d4dc114255d32b3af4fc39;hp=64e1ad98d8b1e4306447f44eb92e14940e5afb01;hb=d086f507d02078aed618ab291a0bc4a634958fa3;hpb=4f5fb4c3d8752aae822ed0066784cc77e6f0f508 diff --git a/src/bin/lttng-sessiond/rotation-thread.h b/src/bin/lttng-sessiond/rotation-thread.h index 64e1ad98d..c7bca0c4b 100644 --- a/src/bin/lttng-sessiond/rotation-thread.h +++ b/src/bin/lttng-sessiond/rotation-thread.h @@ -28,6 +28,17 @@ #include #include "session.h" +/* + * The timer thread enqueues struct sessiond_rotation_timer objects in the list + * and wake up the rotation thread. When the rotation thread wakes up, it + * empties the queue. + */ +struct rotation_thread_timer_queue { + struct lttng_pipe *event_pipe; + struct cds_list_head list; + pthread_mutex_t lock; +}; + struct rotation_thread_handle { /* * Read side of pipes used to communicate with the rotation thread. @@ -38,13 +49,15 @@ struct rotation_thread_handle { int kernel_consumer; /* quit pipe */ int thread_quit_pipe; + struct rotation_thread_timer_queue *rotation_timer_queue; }; struct rotation_thread_handle *rotation_thread_handle_create( struct lttng_pipe *ust32_channel_rotate_pipe, struct lttng_pipe *ust64_channel_rotate_pipe, struct lttng_pipe *kernel_channel_rotate_pipe, - int thread_quit_pipe); + int thread_quit_pipe, + struct rotation_thread_timer_queue *rotation_timer_queue); void rotation_thread_handle_destroy( struct rotation_thread_handle *handle);