Cleanup comments and bad indent
[lttng-tools.git] / ltt-sessiond / session.h
index 9eaa1c535e783897f0ed0ce90bf806b89f7e5e30..d87b54daa7ecd9b51ed91feac0201d21b434f4e6 100644 (file)
@@ -3,8 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation; only version 2
+ * of the License.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,7 +19,6 @@
 #ifndef _LTT_SESSION_H
 #define _LTT_SESSION_H
 
-#include <lttng/lttng.h>
 #include <urcu/list.h>
 
 /*
@@ -37,10 +36,14 @@ struct ltt_session_list {
         * actions on that list.
         */
        pthread_mutex_t lock;
+
        /*
-        * Number of element in the list.
+        * Number of element in the list. The session list lock MUST be acquired if
+        * this counter is used when iterating over the session list.
         */
        unsigned int count;
+
+       /* Linked list head */
        struct cds_list_head head;
 };
 
@@ -66,11 +69,13 @@ struct ltt_session {
 /* Prototypes */
 int create_session(char *name, char *path);
 int destroy_session(char *name);
-void get_lttng_session(struct lttng_session *sessions);
+
 void lock_session(struct ltt_session *session);
+void lock_session_list(void);
 void unlock_session(struct ltt_session *session);
+void unlock_session_list(void);
+
 struct ltt_session *find_session_by_name(char *name);
-unsigned int get_session_count(void);
 struct ltt_session_list *get_session_list(void);
 
 #endif /* _LTT_SESSION_H */
This page took 0.024356 seconds and 4 git commands to generate.