From: Pierre-Marc Fournier Date: Tue, 8 Sep 2009 18:21:54 +0000 (-0400) Subject: cleanup X-Git-Tag: v0.1~153 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=064842c64a65d5d2369b3400a690e1ce66fce394;p=ust.git cleanup --- diff --git a/libust/channels.h b/libust/channels.h index 0d0bc7e..c91874b 100644 --- a/libust/channels.h +++ b/libust/channels.h @@ -80,18 +80,18 @@ struct ltt_channel_setting { char name[PATH_MAX]; }; -int ltt_channels_register(const char *name); -int ltt_channels_unregister(const char *name); -int ltt_channels_set_default(const char *name, +extern int ltt_channels_register(const char *name); +extern int ltt_channels_unregister(const char *name); +extern int ltt_channels_set_default(const char *name, unsigned int subbuf_size, unsigned int subbuf_cnt); -const char *ltt_channels_get_name_from_index(unsigned int index); -int ltt_channels_get_index_from_name(const char *name); -struct ltt_channel_struct *ltt_channels_trace_alloc(unsigned int *nr_channels, +extern const char *ltt_channels_get_name_from_index(unsigned int index); +extern int ltt_channels_get_index_from_name(const char *name); +extern struct ltt_channel_struct *ltt_channels_trace_alloc(unsigned int *nr_channels, int overwrite, int active); -void ltt_channels_trace_free(struct ltt_channel_struct *channels); -int _ltt_channels_get_event_id(const char *channel, const char *name); -int ltt_channels_get_event_id(const char *channel, const char *name); +extern void ltt_channels_trace_free(struct ltt_channel_struct *channels); +extern int _ltt_channels_get_event_id(const char *channel, const char *name); +extern int ltt_channels_get_event_id(const char *channel, const char *name); #endif /* _LTT_CHANNELS_H */ diff --git a/libust/marker.h b/libust/marker.h index 146409c..f07f120 100644 --- a/libust/marker.h +++ b/libust/marker.h @@ -308,8 +308,7 @@ static void __attribute__((constructor)) __markers__init(void) \ marker_register_lib(__start___markers, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));\ } -void marker_set_new_marker_cb(void (*cb)(struct marker *)); - -void init_markers(void); +extern void marker_set_new_marker_cb(void (*cb)(struct marker *)); +extern void init_markers(void); #endif diff --git a/libust/relay.h b/libust/relay.h index ba536d7..0e18279 100644 --- a/libust/relay.h +++ b/libust/relay.h @@ -213,7 +213,7 @@ static inline struct buf_page *ltt_relay_cache_page(struct rchan_buf *buf, } //ust// #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS - static inline void ltt_relay_do_copy(void *dest, const void *src, size_t len) +static inline void ltt_relay_do_copy(void *dest, const void *src, size_t len) { union { const void *src; @@ -317,7 +317,7 @@ static inline int ltt_relay_write(struct rchan_buf *buf, size_t offset, * CONFIG_LTT_RELAY kernel API, ltt/ltt-relay-alloc.c */ -struct rchan *ltt_relay_open(const char *base_filename, +extern struct rchan *ltt_relay_open(const char *base_filename, struct dentry *parent, size_t subbuf_size, size_t n_subbufs, @@ -375,11 +375,11 @@ struct ltt_channel_buf_struct { local_t commit_seq[0] ____cacheline_aligned; } ____cacheline_aligned; -int ltt_do_get_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_buf, long *pconsumed_old); +extern int ltt_do_get_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_buf, long *pconsumed_old); -int ltt_do_put_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_buf, u32 uconsumed_old); +extern int ltt_do_put_subbuf(struct rchan_buf *buf, struct ltt_channel_buf_struct *ltt_buf, u32 uconsumed_old); -void init_ustrelay_transport(void); +extern void init_ustrelay_transport(void); /*static*/ /* inline */ notrace void ltt_commit_slot( struct ltt_channel_struct *ltt_channel, diff --git a/libust/tracer.h b/libust/tracer.h index c680973..601d19a 100644 --- a/libust/tracer.h +++ b/libust/tracer.h @@ -68,7 +68,7 @@ struct ltt_serialize_closure { unsigned int cb_idx; }; -size_t ltt_serialize_data(struct rchan_buf *buf, size_t buf_offset, +extern size_t ltt_serialize_data(struct rchan_buf *buf, size_t buf_offset, struct ltt_serialize_closure *closure, void *serialize_private, int *largest_align, const char *fmt, va_list *args); @@ -552,8 +552,8 @@ enum ltt_module_function { LTT_FUNCTION_STATEDUMP }; -void ltt_transport_register(struct ltt_transport *transport); -void ltt_transport_unregister(struct ltt_transport *transport); +extern void ltt_transport_register(struct ltt_transport *transport); +extern void ltt_transport_unregister(struct ltt_transport *transport); /* Exported control function */ @@ -569,22 +569,22 @@ union ltt_control_args { } new_trace; }; -int _ltt_trace_setup(const char *trace_name); -int ltt_trace_setup(const char *trace_name); -struct ltt_trace_struct *_ltt_trace_find_setup(const char *trace_name); -int ltt_trace_set_type(const char *trace_name, const char *trace_type); -int ltt_trace_set_channel_subbufsize(const char *trace_name, +extern int _ltt_trace_setup(const char *trace_name); +extern int ltt_trace_setup(const char *trace_name); +extern struct ltt_trace_struct *_ltt_trace_find_setup(const char *trace_name); +extern int ltt_trace_set_type(const char *trace_name, const char *trace_type); +extern int ltt_trace_set_channel_subbufsize(const char *trace_name, const char *channel_name, unsigned int size); -int ltt_trace_set_channel_subbufcount(const char *trace_name, +extern int ltt_trace_set_channel_subbufcount(const char *trace_name, const char *channel_name, unsigned int cnt); -int ltt_trace_set_channel_enable(const char *trace_name, +extern int ltt_trace_set_channel_enable(const char *trace_name, const char *channel_name, unsigned int enable); -int ltt_trace_set_channel_overwrite(const char *trace_name, +extern int ltt_trace_set_channel_overwrite(const char *trace_name, const char *channel_name, unsigned int overwrite); -int ltt_trace_alloc(const char *trace_name); -int ltt_trace_destroy(const char *trace_name); -int ltt_trace_start(const char *trace_name); -int ltt_trace_stop(const char *trace_name); +extern int ltt_trace_alloc(const char *trace_name); +extern int ltt_trace_destroy(const char *trace_name); +extern int ltt_trace_start(const char *trace_name); +extern int ltt_trace_stop(const char *trace_name); enum ltt_filter_control_msg { LTT_FILTER_DEFAULT_ACCEPT, @@ -596,16 +596,16 @@ extern int ltt_filter_control(enum ltt_filter_control_msg msg, extern struct dentry *get_filter_root(void); -void ltt_write_trace_header(struct ltt_trace_struct *trace, +extern void ltt_write_trace_header(struct ltt_trace_struct *trace, struct ltt_subbuffer_header *header); extern void ltt_buffer_destroy(struct ltt_channel_struct *ltt_chan); -void ltt_core_register(int (*function)(u8, void *)); +extern void ltt_core_register(int (*function)(u8, void *)); -void ltt_core_unregister(void); +extern void ltt_core_unregister(void); -void ltt_release_trace(struct kref *kref); -void ltt_release_transport(struct kref *kref); +extern void ltt_release_trace(struct kref *kref); +extern void ltt_release_transport(struct kref *kref); extern int ltt_probe_register(struct ltt_available_probe *pdata); extern int ltt_probe_unregister(struct ltt_available_probe *pdata); @@ -615,9 +615,9 @@ extern int ltt_marker_disconnect(const char *channel, const char *mname, const char *pname); extern void ltt_dump_marker_state(struct ltt_trace_struct *trace); -void ltt_lock_traces(void); -void ltt_unlock_traces(void); +extern void ltt_lock_traces(void); +extern void ltt_unlock_traces(void); -struct ltt_trace_struct *_ltt_trace_find(const char *trace_name); +extern struct ltt_trace_struct *_ltt_trace_find(const char *trace_name); #endif /* _LTT_TRACER_H */