From 1be435396a9c3673fbda15bba2a1cf066a893408 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 2 Apr 2021 18:45:31 -0400 Subject: [PATCH] Move the mmap wrapper to 'common/compat/' This is part of an effort to standardize our autotools setup across projects to simplify maintenance. Change-Id: I6fd5517793459c89fe22249ae08e844874a3a7fe Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- src/common/Makefile.am | 2 +- src/common/{ringbuffer => compat}/mmap.h | 6 +++--- src/common/counter/shm.c | 2 +- src/common/ringbuffer/shm.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/common/{ringbuffer => compat}/mmap.h (74%) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index fdbbc05c..1c6fcbf0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -19,6 +19,7 @@ noinst_HEADERS = \ noinst_HEADERS += \ compat/dlfcn.h \ + compat/mmap.h \ compat/tid.h # These headers should be moved to the public headers when tested and @@ -85,7 +86,6 @@ libringbuffer_la_SOURCES = \ ringbuffer/frontend_internal.h \ ringbuffer/frontend_types.h \ ringbuffer/getcpu.h \ - ringbuffer/mmap.h \ ringbuffer/nohz.h \ ringbuffer/rb-init.h \ ringbuffer/ring_buffer_backend.c \ diff --git a/src/common/ringbuffer/mmap.h b/src/common/compat/mmap.h similarity index 74% rename from src/common/ringbuffer/mmap.h rename to src/common/compat/mmap.h index 39c06246..331f6c97 100644 --- a/src/common/ringbuffer/mmap.h +++ b/src/common/compat/mmap.h @@ -4,8 +4,8 @@ * Copyright (C) 2019 Jonathan Rajotte */ -#ifndef _LTTNG_MMAP_H -#define _LTTNG_MMAP_H +#ifndef _UST_COMMON_COMPAT_MMAP_H +#define _UST_COMMON_COMPAT_MMAP_H #include @@ -15,4 +15,4 @@ # define LTTNG_MAP_POPULATE 0 #endif /* __linux__ && MAP_POPULATE */ -#endif /* _LTTNG_MMAP_H */ +#endif /* _UST_COMMON_COMPAT_MMAP_H */ diff --git a/src/common/counter/shm.c b/src/common/counter/shm.c index 596d5e59..e421d045 100644 --- a/src/common/counter/shm.c +++ b/src/common/counter/shm.c @@ -29,7 +29,7 @@ #include "common/macros.h" #include "common/ust-fd.h" -#include "common/ringbuffer/mmap.h" +#include "common/compat/mmap.h" /* * Ensure we have the required amount of space available by writing 0 diff --git a/src/common/ringbuffer/shm.c b/src/common/ringbuffer/shm.c index a5de019c..8be7e359 100644 --- a/src/common/ringbuffer/shm.c +++ b/src/common/ringbuffer/shm.c @@ -29,7 +29,7 @@ #include "common/macros.h" #include "common/ust-fd.h" -#include "mmap.h" +#include "common/compat/mmap.h" /* * Ensure we have the required amount of space available by writing 0 -- 2.34.1