[ltt-dev] [UST PATCH] Fix variable declaration of the clock source v2
Mathieu Desnoyers
compudj at krystal.dyndns.org
Fri Jan 14 13:05:29 EST 2011
* David Goulet (david.goulet at polymtl.ca) wrote:
> 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
Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>
> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
> ---
> include/ust/clock.h | 2 +-
> libust/tracectl.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/ust/clock.h b/include/ust/clock.h
> index ac0a2d5..04785fc 100644
> --- a/include/ust/clock.h
> +++ b/include/ust/clock.h
> @@ -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__
> diff --git a/libust/tracectl.c b/libust/tracectl.c
> index 4f016bb..b73fa7c 100644
> --- a/libust/tracectl.c
> +++ b/libust/tracectl.c
> @@ -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;
> --
> 1.7.3.5
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list