X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ltt-sessiond%2Fsession.h;h=41883c60959029dc3f466e14b4e792fcfa627faa;hb=f6a9efaa0fe496b7fa4850daa2eae98a240433e1;hp=dad0cd9296a66bda15705fad50f614c7e96863b3;hpb=82a3637f639486c07ff937ab03e1e9532379d26a;p=lttng-tools.git diff --git a/ltt-sessiond/session.h b/ltt-sessiond/session.h index dad0cd929..41883c609 100644 --- a/ltt-sessiond/session.h +++ b/ltt-sessiond/session.h @@ -19,14 +19,17 @@ #ifndef _LTT_SESSION_H #define _LTT_SESSION_H -//#include +#include #include +#include "trace-kernel.h" +#include "trace-ust.h" + /* * Tracing session list * * Statically declared in session.c and can be accessed by using - * get_session_list() function that returns the pointer to the list. + * session_get_list() function that returns the pointer to the list. */ struct ltt_session_list { /* @@ -53,30 +56,30 @@ struct ltt_session_list { * session for both LTTng and UST. */ struct ltt_session { - char *name; - char *path; + char name[NAME_MAX]; + char path[PATH_MAX]; struct ltt_kernel_session *kernel_session; - struct cds_list_head ust_traces; - unsigned int ust_trace_count; + struct ltt_ust_session *ust_session; /* * Protect any read/write on this session data structure. This lock must be * acquired *before* using any public functions declared below. Use - * lock_session() and unlock_session() for that. + * session_lock() and session_unlock() for that. */ pthread_mutex_t lock; struct cds_list_head list; }; /* Prototypes */ -int create_session(char *name, char *path); -int destroy_session(char *name); +int session_create(char *name, char *path); +int session_destroy(struct ltt_session *session); -void lock_session(struct ltt_session *session); -void lock_session_list(void); -void unlock_session(struct ltt_session *session); -void unlock_session_list(void); +void session_lock(struct ltt_session *session); +void session_lock_list(void); +void session_unlock(struct ltt_session *session); +void session_unlock_list(void); -struct ltt_session *find_session_by_name(char *name); -struct ltt_session_list *get_session_list(void); +struct ltt_session *session_find_by_name(char *name); +struct ltt_session_list *session_get_list(void); +unsigned long session_ust_count(struct ltt_session *session); #endif /* _LTT_SESSION_H */