From e58e5ad5abb76f1d91d6b23ec77036ff1616f832 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 6 Apr 2021 19:22:08 -0400 Subject: [PATCH] Move jhash.h to 'src/common/' Change-Id: I17031c461b8376e92900239aceac45258e8e3c1b Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- src/common/Makefile.am | 1 + src/{lib/lttng-ust => common}/jhash.h | 5 +++++ src/lib/lttng-ust/Makefile.am | 2 -- src/lib/lttng-ust/lttng-context-provider.c | 2 +- src/lib/lttng-ust/lttng-events.c | 2 +- src/lib/lttng-ust/lttng-probes.c | 2 +- src/lib/lttng-ust/lttng-ust-statedump.c | 2 +- src/lib/lttng-ust/tracepoint.c | 2 +- src/lib/lttng-ust/ust-core.c | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) rename src/{lib/lttng-ust => common}/jhash.h (98%) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index d80172dd..ff2cfd71 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -15,6 +15,7 @@ noinst_HEADERS = \ dynamic-type.h \ elf.h \ events.h \ + jhash.h \ logging.h \ macros.h \ patient.h \ diff --git a/src/lib/lttng-ust/jhash.h b/src/common/jhash.h similarity index 98% rename from src/lib/lttng-ust/jhash.h rename to src/common/jhash.h index bd34cc59..4941b945 100644 --- a/src/lib/lttng-ust/jhash.h +++ b/src/common/jhash.h @@ -4,6 +4,9 @@ * Copyright (C) 2011 Mathieu Desnoyers */ +#ifndef _UST_COMMON_JHASH_H +#define _UST_COMMON_JHASH_H + #include #include #include @@ -222,3 +225,5 @@ uint32_t jhash(const void *key, size_t length, uint32_t seed) { return hashlittle(key, length, seed); } + +#endif /* _UST_COMMON_JHASH_H */ diff --git a/src/lib/lttng-ust/Makefile.am b/src/lib/lttng-ust/Makefile.am index ef035a18..1d0e85f1 100644 --- a/src/lib/lttng-ust/Makefile.am +++ b/src/lib/lttng-ust/Makefile.am @@ -23,7 +23,6 @@ liblttng_ust_tracepoint_la_SOURCES = \ tracepoint-weak-test.c \ tracepoint-internal.h \ lttng-tracer-core.h \ - jhash.h \ error.h liblttng_ust_tracepoint_la_LIBADD = \ @@ -80,7 +79,6 @@ liblttng_ust_runtime_la_SOURCES = \ tracepoint-internal.h \ events.h \ clock.h \ - jhash.h \ lttng-ust-uuid.h \ error.h \ tracef.c \ diff --git a/src/lib/lttng-ust/lttng-context-provider.c b/src/lib/lttng-ust/lttng-context-provider.c index caeb387b..cc437067 100644 --- a/src/lib/lttng-ust/lttng-context-provider.c +++ b/src/lib/lttng-ust/lttng-context-provider.c @@ -16,7 +16,7 @@ #include "context-internal.h" #include "lttng-tracer-core.h" -#include "jhash.h" +#include "common/jhash.h" #include "context-provider-internal.h" #include "common/macros.h" diff --git a/src/lib/lttng-ust/lttng-events.c b/src/lib/lttng-ust/lttng-events.c index 13becb91..9ebd61dd 100644 --- a/src/lib/lttng-ust/lttng-events.c +++ b/src/lib/lttng-ust/lttng-events.c @@ -55,7 +55,7 @@ #include "common/ringbuffer/frontend_types.h" #include "common/ringbuffer/frontend.h" #include "common/counter/counter.h" -#include "jhash.h" +#include "common/jhash.h" #include #include "context-provider-internal.h" diff --git a/src/lib/lttng-ust/lttng-probes.c b/src/lib/lttng-ust/lttng-probes.c index 2dff30f4..b2e77e01 100644 --- a/src/lib/lttng-ust/lttng-probes.c +++ b/src/lib/lttng-ust/lttng-probes.c @@ -19,7 +19,7 @@ #include #include "lttng-tracer-core.h" -#include "jhash.h" +#include "common/jhash.h" #include "error.h" #include "lib/lttng-ust/events.h" diff --git a/src/lib/lttng-ust/lttng-ust-statedump.c b/src/lib/lttng-ust/lttng-ust-statedump.c index 1873fa4c..fa72e34b 100644 --- a/src/lib/lttng-ust/lttng-ust-statedump.c +++ b/src/lib/lttng-ust/lttng-ust-statedump.c @@ -20,7 +20,7 @@ #include "common/macros.h" #include "lttng-tracer-core.h" #include "lttng-ust-statedump.h" -#include "jhash.h" +#include "common/jhash.h" #include "common/getenv.h" #include "lib/lttng-ust/events.h" diff --git a/src/lib/lttng-ust/tracepoint.c b/src/lib/lttng-ust/tracepoint.c index 7042339b..e7f520ab 100644 --- a/src/lib/lttng-ust/tracepoint.c +++ b/src/lib/lttng-ust/tracepoint.c @@ -28,7 +28,7 @@ #include "tracepoint-internal.h" #include "lttng-tracer-core.h" -#include "jhash.h" +#include "common/jhash.h" #include "error.h" /* Test compiler support for weak symbols with hidden visibility. */ diff --git a/src/lib/lttng-ust/ust-core.c b/src/lib/lttng-ust/ust-core.c index 88330a1e..95a0a2a2 100644 --- a/src/lib/lttng-ust/ust-core.c +++ b/src/lib/lttng-ust/ust-core.c @@ -15,7 +15,7 @@ #include "lttng-tracer-core.h" #include "lttng-rb-clients.h" #include "lttng-counter-client.h" -#include "jhash.h" +#include "common/jhash.h" static CDS_LIST_HEAD(lttng_transport_list); static CDS_LIST_HEAD(lttng_counter_transport_list); -- 2.34.1