* iterate or/and do any actions on that list.
*/
pthread_mutex_t lock;
+ /*
+ * This condition variable is signaled on every removal from
+ * the session list.
+ */
+ pthread_cond_t removal_cond;
/*
* Session unique ID generator. The session list lock MUST be
pthread_mutex_t lock;
struct cds_list_head list;
uint64_t id; /* session unique identifier */
+ /* Indicates if the session has been added to the session list and ht.*/
+ bool published;
/* Indicates if a destroy command has been applied to this session. */
bool destroyed;
/* UID/GID of the user owning the session */
/* Indicate if the session has to output the traces or not. */
unsigned int output_traces;
/*
- * This session is in snapshot mode. This means that every channel enabled
- * will be set in overwrite mode and mmap. It is considered exclusively for
- * snapshot purposes.
+ * This session is in snapshot mode. This means that channels enabled
+ * will be set in overwrite mode by default and must be in mmap
+ * output mode. Note that snapshots can be taken on a session that
+ * is not in "snapshot_mode". This parameter only affects channel
+ * creation defaults.
*/
unsigned int snapshot_mode;
+ /*
+ * A session that has channels that don't use 'mmap' output can't be
+ * used to capture snapshots. This is set to true whenever a
+ * 'splice' kernel channel is enabled.
+ */
+ bool has_non_mmap_channel;
/*
* Timer set when the session is created for live reading.
*/
struct ltt_session *session_find_by_name(const char *name);
struct ltt_session *session_find_by_id(uint64_t id);
+
struct ltt_session_list *session_get_list(void);
+void session_list_wait_empty(void);
int session_access_ok(struct ltt_session *session, uid_t uid, gid_t gid);