Fix variable declaration of the clock source v2
authorDavid Goulet <david.goulet@polymtl.ca>
Fri, 14 Jan 2011 17:14:31 +0000 (18:14 +0100)
committerNils Carlson <nils.carlson@ericsson.com>
Fri, 14 Jan 2011 20:47:35 +0000 (21:47 +0100)
The ust_clock_source was static in clock.h header file.
Thus, tracectl.c was not able to modify that variable for
the trace clock read function. Bad timestamp was always
returned if CLOCK_TRACE was not available.

v2:
Comment by Mathieu Desnoyers, set clock source variable
to extern in clock.h

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Nils Carlson <nils.carlson@ericsson.com>
include/ust/clock.h
libust/tracectl.c

index ac0a2d5a9e1453460f4225f968d0496d059c3633..04785fc34e7bf1154fa725129db3a0af20ba5668 100644 (file)
@@ -49,7 +49,7 @@ union lttng_timespec {
 };
 #endif /* __i386__ || __x86_64__ */
 
-static int ust_clock_source;
+extern int ust_clock_source;
 
 /* Choosing correct trace clock */
 #if __PPC__
index 4f016bb08215ae43844adf50f1c651d50716b489..b73fa7cdf88f05fa106dc8ba01b5b6f9cfa9ce19 100644 (file)
@@ -74,6 +74,8 @@ static struct cds_list_head ust_socks = CDS_LIST_HEAD_INIT(ust_socks);
 /* volatile because shared between the listener and the main thread */
 int buffers_to_export = 0;
 
+int ust_clock_source;
+
 static long long make_pidunique(void)
 {
        s64 retval;
This page took 0.024826 seconds and 4 git commands to generate.