X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.h;fp=src%2Fbin%2Flttng-sessiond%2Frotation-thread.h;h=64e1ad98d8b1e4306447f44eb92e14940e5afb01;hp=0000000000000000000000000000000000000000;hb=db66e57489e5014289dc1d831e1eac90ac4fc0da;hpb=b99a8d4211e26a847ca8916884354f159c999ad2 diff --git a/src/bin/lttng-sessiond/rotation-thread.h b/src/bin/lttng-sessiond/rotation-thread.h new file mode 100644 index 000000000..64e1ad98d --- /dev/null +++ b/src/bin/lttng-sessiond/rotation-thread.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2017 - Julien Desfossez + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License, version 2 only, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef ROTATION_THREAD_H +#define ROTATION_THREAD_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include "session.h" + +struct rotation_thread_handle { + /* + * Read side of pipes used to communicate with the rotation thread. + */ + /* Notification from the consumers */ + int ust32_consumer; + int ust64_consumer; + int kernel_consumer; + /* quit pipe */ + int thread_quit_pipe; +}; + +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); + +void rotation_thread_handle_destroy( + struct rotation_thread_handle *handle); + +void *thread_rotation(void *data); + +#endif /* ROTATION_THREAD_H */