projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: rotation may never complete in per-PID buffering mode
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
rotation-thread.h
diff --git
a/src/bin/lttng-sessiond/rotation-thread.h
b/src/bin/lttng-sessiond/rotation-thread.h
index 64e1ad98d8b1e4306447f44eb92e14940e5afb01..618797f108d3d842142c55d65a4842af10ad5e06 100644
(file)
--- a/
src/bin/lttng-sessiond/rotation-thread.h
+++ b/
src/bin/lttng-sessiond/rotation-thread.h
@@
-1,5
+1,6
@@
/*
* Copyright (C) 2017 - Julien Desfossez <jdesfossez@efficios.com>
/*
* Copyright (C) 2017 - Julien Desfossez <jdesfossez@efficios.com>
+ * Copyright (C) 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
* 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
*
* 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
@@
-26,29
+27,36
@@
#include <common/compat/poll.h>
#include <common/hashtable/hashtable.h>
#include <pthread.h>
#include <common/compat/poll.h>
#include <common/hashtable/hashtable.h>
#include <pthread.h>
+#include <semaphore.h>
#include "session.h"
#include "session.h"
+#include "notification-thread.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;
+extern struct lttng_notification_channel *rotate_notification_channel;
+
+enum rotation_thread_job_type {
+ ROTATION_THREAD_JOB_TYPE_SCHEDULED_ROTATION,
+ ROTATION_THREAD_JOB_TYPE_CHECK_PENDING_ROTATION
};
};
+struct rotation_thread_timer_queue;
+struct rotation_thread_handle;
+
+struct rotation_thread_timer_queue *rotation_thread_timer_queue_create(void);
+void rotation_thread_timer_queue_destroy(
+ struct rotation_thread_timer_queue *queue);
+
struct rotation_thread_handle *rotation_thread_handle_create(
struct rotation_thread_handle *rotation_thread_handle_create(
-
struct lttng_pipe *ust32_channel_rotate
_pipe,
- struct
lttng_pipe *ust64_channel_rotate_pip
e,
- struct
lttng_pipe *kernel_channel_rotate_pip
e,
-
int thread_quit_pipe
);
+
int thread_quit
_pipe,
+ struct
rotation_thread_timer_queue *rotation_timer_queu
e,
+ struct
notification_thread_handle *notification_thread_handl
e,
+
sem_t *notification_thread_ready
);
void rotation_thread_handle_destroy(
struct rotation_thread_handle *handle);
void rotation_thread_handle_destroy(
struct rotation_thread_handle *handle);
+void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue,
+ enum rotation_thread_job_type job_type, uint64_t session_id);
+
void *thread_rotation(void *data);
#endif /* ROTATION_THREAD_H */
void *thread_rotation(void *data);
#endif /* ROTATION_THREAD_H */
This page took
0.025136 seconds
and
4
git commands to generate.