Also remove repeated include headers.
Signed-off-by: David Goulet <dgoulet@efficios.com>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <urcu.h>
#include <common/common.h>
* The caller MUST acquire the session list lock before.
* Returns the unique identifier for the session.
*/
-static int add_session_list(struct ltt_session *ls)
+static unsigned int add_session_list(struct ltt_session *ls)
{
cds_list_add(&ls->list, <t_session_list.head);
return ++ltt_session_list.count;
new_session->id = add_session_list(new_session);
session_unlock_list();
- DBG("Tracing session %s created in %s with ID %d by UID %d GID %d",
+ DBG("Tracing session %s created in %s with ID %u by UID %d GID %d",
name, path, new_session->id,
new_session->uid, new_session->gid);
#ifndef _LTT_SESSION_H
#define _LTT_SESSION_H
-#include <pthread.h>
-#include <unistd.h>
#include <urcu/list.h>
#include "trace-kernel.h"
pthread_mutex_t lock;
struct cds_list_head list;
int enabled; /* enabled/started flag */
- int id; /* session unique identifier */
+ unsigned int id; /* session unique identifier */
/* UID/GID of the user owning the session */
uid_t uid;
gid_t gid;
#ifndef _LTT_TRACE_KERNEL_H
#define _LTT_TRACE_KERNEL_H
-#include <limits.h>
#include <urcu/list.h>
#include <lttng/lttng.h>
*
* Return pointer to structure or NULL.
*/
-struct ltt_ust_session *trace_ust_create_session(char *path, int session_id,
- struct lttng_domain *domain)
+struct ltt_ust_session *trace_ust_create_session(char *path,
+ unsigned int session_id, struct lttng_domain *domain)
{
int ret;
struct ltt_ust_session *lus;
rcu_read_lock();
- DBG2("Trace UST destroy session %d", session->id);
+ DBG2("Trace UST destroy session %u", session->id);
/* Cleaning up UST domain */
destroy_domain_global(&session->domain_global);
#include <config.h>
#include <limits.h>
-#include <urcu.h>
#include <urcu/list.h>
#include <lttng/lttng.h>
/*
* Create functions malloc() the data structure.
*/
-struct ltt_ust_session *trace_ust_create_session(char *path, int session_id,
- struct lttng_domain *domain);
+struct ltt_ust_session *trace_ust_create_session(char *path,
+ unsigned int session_id, struct lttng_domain *domain);
struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr,
char *path);
struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev);