[sheepdog] [PATCH 2/3] trace: move init_signal to trace_init_signal

Liu Yuan namei.unix at gmail.com
Mon Jul 23 05:23:35 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

This is preparation for signal_handler patch

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/sheep.c       |    5 +++++
 sheep/trace/trace.c |    2 +-
 sheep/trace/trace.h |    4 ++--
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sheep/sheep.c b/sheep/sheep.c
index 53da29d..3ae1ec9 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -122,6 +122,11 @@ static int create_pidfile(const char *filename)
 	return 0;
 }
 
+static int init_signal(void)
+{
+	return trace_init_signal();
+}
+
 static struct cluster_info __sys;
 struct cluster_info *sys = &__sys;
 
diff --git a/sheep/trace/trace.c b/sheep/trace/trace.c
index 3959bc7..56817e8 100644
--- a/sheep/trace/trace.c
+++ b/sheep/trace/trace.c
@@ -250,7 +250,7 @@ notrace int trace_disable(void)
 	return SD_RES_SUCCESS;
 }
 
-int init_signal(void)
+int trace_init_signal(void)
 {
 	struct sigaction act;
 
diff --git a/sheep/trace/trace.h b/sheep/trace/trace.h
index c9c766b..dd95a39 100644
--- a/sheep/trace/trace.h
+++ b/sheep/trace/trace.h
@@ -53,7 +53,7 @@ extern unsigned long trace_return_call(void);
   extern pthread_cond_t trace_cond;
   extern pthread_mutex_t trace_mux;
 
-  extern int init_signal(void);
+  extern int trace_init_signal(void);
   extern int trace_init(void);
   extern int register_trace_function(trace_func_t func);
   extern int trace_enable(void);
@@ -62,7 +62,7 @@ extern unsigned long trace_return_call(void);
   extern int trace_copy_buffer(void *buf);
   extern void trace_reset_buffer(void);
 #else
-  static inline int init_signal(void) { return 0; }
+  static inline int trace_init_signal(void) { return 0; }
   static inline int trace_init(void) { return 0; }
   static inline int trace_enable(void) { return 0; }
   static inline int trace_disable(void) { return 0; }
-- 
1.7.10.2




More information about the sheepdog mailing list