aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-03-08 07:04:19 -0500
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-03-08 07:13:22 -0500
commit34337fec8c4acbb9b389df59a7b7a6df83004a18 (patch)
treee240d805b0afe7410580a97491571a3dfdb36e28
parentc01338b2323d83bcdb1cd0d0fc143a993072e5b7 (diff)
downloadlibrseq-34337fec8c4acbb9b389df59a7b7a6df83004a18.tar.gz
Rename percpu-alloc files to mempool
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Change-Id: I0a1ba042649cf3b2224a90a05e095733e9a597fc
-rw-r--r--include/Makefile.am2
-rw-r--r--include/rseq/mempool.h (renamed from include/rseq/percpu-alloc.h)8
-rw-r--r--src/Makefile.am2
-rw-r--r--src/rseq-mempool.c (renamed from src/rseq-percpu-alloc.c)4
-rw-r--r--src/rseq-utils.h (renamed from src/rseq-alloc-utils.h)6
-rw-r--r--tests/param_test.c2
6 files changed, 12 insertions, 12 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 29bf6c1..249f8f1 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -26,8 +26,8 @@ nobase_include_HEADERS = \
rseq/arch.h \
rseq/compiler.h \
rseq/inject.h \
+ rseq/mempool.h \
rseq/pseudocode.h \
- rseq/percpu-alloc.h \
rseq/rseq.h \
rseq/thread-pointer.h \
rseq/utils.h
diff --git a/include/rseq/percpu-alloc.h b/include/rseq/mempool.h
index 54580a7..aecf902 100644
--- a/include/rseq/percpu-alloc.h
+++ b/include/rseq/mempool.h
@@ -1,15 +1,15 @@
/* SPDX-License-Identifier: MIT */
/* SPDX-FileCopyrightText: 2024 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */
-#ifndef _RSEQ_PERCPU_ALLOC_H
-#define _RSEQ_PERCPU_ALLOC_H
+#ifndef _RSEQ_MEMPOOL_H
+#define _RSEQ_MEMPOOL_H
#include <stddef.h>
#include <sys/types.h>
#include <sys/mman.h>
/*
- * rseq/percpu-alloc.h: rseq CPU-Local Storage (CLS) memory allocator.
+ * rseq/mempool.h: rseq CPU-Local Storage (CLS) memory allocator.
*
* The rseq per-CPU memory allocator allows the application the request
* memory pools of CPU-Local memory each of containing objects of a
@@ -316,4 +316,4 @@ int rseq_pool_attr_set_robust(struct rseq_pool_attr *attr);
}
#endif
-#endif /* _RSEQ_PERCPU_ALLOC_H */
+#endif /* _RSEQ_MEMPOOL_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 45e119d..bb627a1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@
lib_LTLIBRARIES = librseq.la
librseq_la_SOURCES = \
- rseq.c rseq-percpu-alloc.c rseq-alloc-utils.h
+ rseq.c rseq-mempool.c rseq-utils.h
librseq_la_LDFLAGS = -no-undefined -version-info $(RSEQ_LIBRARY_VERSION)
librseq_la_LIBADD = $(DL_LIBS)
diff --git a/src/rseq-percpu-alloc.c b/src/rseq-mempool.c
index 39794a9..0eb2f4d 100644
--- a/src/rseq-percpu-alloc.c
+++ b/src/rseq-mempool.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-#include <rseq/percpu-alloc.h>
+#include <rseq/mempool.h>
#include <sys/mman.h>
#include <assert.h>
#include <string.h>
@@ -19,7 +19,7 @@
# include <numaif.h>
#endif
-#include "rseq-alloc-utils.h"
+#include "rseq-utils.h"
/*
* rseq-percpu-alloc.c: rseq CPU-Local Storage (CLS) memory allocator.
diff --git a/src/rseq-alloc-utils.h b/src/rseq-utils.h
index 387d128..8ff0b6b 100644
--- a/src/rseq-alloc-utils.h
+++ b/src/rseq-utils.h
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-#ifndef _RSEQ_ALLOC_UTILS_H
-#define _RSEQ_ALLOC_UTILS_H
+#ifndef _RSEQ_UTILS_H
+#define _RSEQ_UTILS_H
#define RSEQ_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
@@ -115,4 +115,4 @@ int rseq_hweight_ulong(unsigned long v)
return __builtin_popcountl(v);
}
-#endif /* _RSEQ_ALLOC_UTILS_H */
+#endif /* _RSEQ_UTILS_H */
diff --git a/tests/param_test.c b/tests/param_test.c
index 3ed1981..b3c4ce0 100644
--- a/tests/param_test.c
+++ b/tests/param_test.c
@@ -20,7 +20,7 @@
#include <errno.h>
#include <stddef.h>
#include <stdbool.h>
-#include <rseq/percpu-alloc.h>
+#include <rseq/mempool.h>
#define PERCPU_POOL_LEN (1024*1024) /* 1MB */