X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsession.h;h=6a0da6c164f95a48b15a2e0250611d77a0dcf2ec;hb=e7ab49a85e4e5c5749949191bdeefa21a9aef9b1;hp=6a059798d925afbd681f07a898f866e7dc8374f2;hpb=e32d7f274604b77bcd83c24994e88df3761ed658;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/session.h b/src/bin/lttng-sessiond/session.h index 6a059798d..6a0da6c16 100644 --- a/src/bin/lttng-sessiond/session.h +++ b/src/bin/lttng-sessiond/session.h @@ -47,6 +47,11 @@ struct ltt_session_list { * 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 @@ -76,6 +81,8 @@ struct ltt_session { 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 */ @@ -232,7 +239,9 @@ struct lttng_trace_archive_location *session_get_trace_archive_location( 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);