fix warnings
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Jun 2009 17:34:18 +0000 (13:34 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Mon, 15 Jun 2009 17:34:18 +0000 (13:34 -0400)
libust/marker-control.h
libust/marker.h
libust/relay.h
libust/tracectl.c
libustcomm/ustcomm.h

index 0b602db9fd3b14bcef4a7b32e0182dfc45d8a80d..0a139806f16942ccdbedfb5ee2e57bc5c1315556 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef MARKER_CONTROL_H
 #define MARKER_CONTROL_H
 
-int marker_control_init(void);
+int init_marker_control(void);
 int ltt_probe_register(struct ltt_available_probe *pdata);
 
 #endif /* MARKER_CONTROL_H */
index 3a86ac3732c4e5924aa6bd776c77fda8edcf6616..25c27f62ca774020ae43c7c7e2e86e52810af8d2 100644 (file)
@@ -297,4 +297,6 @@ static void __attribute__((constructor)) __markers__init(void)                              \
 
 void marker_set_new_marker_cb(void (*cb)(struct marker *));
 
+void init_markers(void);
+
 #endif
index cb5c43847d273f6fa3c19232416b8b5f28b5524a..630c4eacc5ebd3e43995d93eb06920b7719a98dc 100644 (file)
@@ -371,4 +371,6 @@ int ltt_do_get_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_
 
 int ltt_do_put_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_buf, u32 uconsumed_old);
 
+void init_ustrelay_transport(void);
+
 #endif /* _LINUX_LTT_RELAY_H */
index abd796203d19e0c0d098b6ea5f5302a77f1ad56a..1ee3e45ad8bec3830567f4540022ca4a7568f727 100644 (file)
@@ -14,6 +14,7 @@
 #include "localerr.h"
 #include "ustcomm.h"
 #include "relay.h" /* FIXME: remove */
+#include "marker-control.h"
 
 //#define USE_CLONE
 
@@ -208,9 +209,6 @@ void *listener_main(void *p)
        DBG("LISTENER");
 
        for(;;) {
-               uint32_t size;
-               struct sockaddr_un addr;
-               socklen_t addrlen = sizeof(addr);
                char trace_name[] = "auto";
                char trace_type[] = "ustrelay";
                char *recvbuf;
@@ -355,7 +353,6 @@ void *listener_main(void *p)
                                struct rchan *rchan = trace->channels[i].trans_channel_data;
                                struct rchan_buf *rbuf = rchan->buf;
                                struct ltt_channel_struct *ltt_channel = (struct ltt_channel_struct *)rchan->private_data;
-                               struct ltt_channel_buf_struct *ltt_buf = ltt_channel->buf;
 
                                if(!strcmp(trace->channels[i].channel_name, channel_name)) {
                                        char *reply;
@@ -500,9 +497,6 @@ void *listener_main(void *p)
                                if(!strcmp(trace->channels[i].channel_name, channel_name)) {
                                        struct rchan_buf *rbuf = rchan->buf;
                                        struct ltt_channel_buf_struct *lttbuf = trace->channels[i].buf;
-                                       char *reply;
-                                       long consumed_old=0;
-                                       int fd;
                                        struct blocked_consumer *bc;
 
                                        bc = (struct blocked_consumer *) malloc(sizeof(struct blocked_consumer));
@@ -598,7 +592,6 @@ void *listener_main(void *p)
                        char *channel_slash_name = nth_token(recvbuf, 1);
                        char channel_name[256]="";
                        char marker_name[256]="";
-                       struct marker_iter iter;
 
                        result = sscanf(channel_slash_name, "%255[^/]/%255s", channel_name, marker_name);
 
@@ -617,7 +610,6 @@ void *listener_main(void *p)
                        char *channel_slash_name = nth_token(recvbuf, 1);
                        char *marker_name;
                        char *channel_name;
-                       struct marker_iter iter;
 
                        result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
 
@@ -688,13 +680,11 @@ void *listener_main(void *p)
        }
 }
 
-static char listener_stack[16384];
-
 void create_listener(void)
 {
-       int result;
+#ifdef USE_CLONE
        static char listener_stack[16384];
-       //char *listener_stack = malloc(16384);
+#endif
 
 #ifdef USE_CLONE
        result = clone(listener_main, listener_stack+sizeof(listener_stack)-1, CLONE_FS | CLONE_FILES | CLONE_VM | CLONE_SIGHAND | CLONE_THREAD, NULL);
@@ -734,18 +724,22 @@ static int init_socket(void)
        return ustcomm_init_app(getpid(), &ustcomm_app);
 }
 
+/* FIXME: reenable this to delete socket file. */
+
+#if 0
 static void destroy_socket(void)
 {
-//     int result;
-//
-//     if(mysocketfile[0] == '\0')
-//             return;
-//
-//     result = unlink(mysocketfile);
-//     if(result == -1) {
-//             PERROR("unlink");
-//     }
+       int result;
+
+       if(mysocketfile[0] == '\0')
+               return;
+
+       result = unlink(mysocketfile);
+       if(result == -1) {
+               PERROR("unlink");
+       }
 }
+#endif
 
 static int init_signal_handler(void)
 {
@@ -797,8 +791,6 @@ static void __attribute__((constructor(101))) init0()
        }
 }
 
-static void fini(void);
-
 static void __attribute__((constructor(1000))) init()
 {
        int result;
index 052c896aca17ad6561e4d84910e617d04ca8ae07..d48a115c896cf1ebe50f4669334468613ea9c646 100644 (file)
@@ -37,6 +37,7 @@ struct ustcomm_source {
 char *strdup_malloc(const char *s);
 
 //int send_message_pid(pid_t pid, const char *msg, char **reply);
+int ustcomm_request_consumer(pid_t pid, const char *channel);
 
 int ustcomm_ustd_recv_message(struct ustcomm_ustd *ustd, char **msg, struct ustcomm_source *src, int timeout);
 int ustcomm_app_recv_message(struct ustcomm_app *app, char **msg, struct ustcomm_source *src, int timeout);
@@ -47,6 +48,7 @@ int ustcomm_init_ustd(struct ustcomm_ustd *handle);
 
 int ustcomm_connect_app(pid_t pid, struct ustcomm_connection *conn);
 int ustcomm_send_request(struct ustcomm_connection *conn, char *req, char **reply);
+int ustcomm_send_reply(struct ustcomm_server *server, char *msg, struct ustcomm_source *src);
 
 int nth_token_is(char *str, char *token, int tok_no);
 
This page took 0.02938 seconds and 4 git commands to generate.