From 20100e740ee82d0b80d96d4a9513335da6e5f454 Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Wed, 9 Aug 2017 22:58:42 +0000 Subject: [PATCH] Pick 'Remove external linkage for spin_adaptive' from upstream jemalloc Apply the changes from upstream jemalloc 048c6679. This is actually not quite a cherry pick due to makefile difference and because FreeBSD does not carry the msvc project files which were also modified in that commit. Approved by: jasone (maintainer), markj (mentor) Sponsored by: Dell EMC Isilon --- contrib/jemalloc/include/jemalloc/internal/spin.h | 8 +------- contrib/jemalloc/src/spin.c | 4 ---- lib/libc/stdlib/jemalloc/Makefile.inc | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 contrib/jemalloc/src/spin.c diff --git a/contrib/jemalloc/include/jemalloc/internal/spin.h b/contrib/jemalloc/include/jemalloc/internal/spin.h index e2afc98cfda2..aded0fcc174d 100644 --- a/contrib/jemalloc/include/jemalloc/internal/spin.h +++ b/contrib/jemalloc/include/jemalloc/internal/spin.h @@ -1,19 +1,13 @@ #ifndef JEMALLOC_INTERNAL_SPIN_H #define JEMALLOC_INTERNAL_SPIN_H -#ifdef JEMALLOC_SPIN_C_ -# define SPIN_INLINE extern inline -#else -# define SPIN_INLINE inline -#endif - #define SPIN_INITIALIZER {0U} typedef struct { unsigned iteration; } spin_t; -SPIN_INLINE void +static inline void spin_adaptive(spin_t *spin) { volatile uint32_t i; diff --git a/contrib/jemalloc/src/spin.c b/contrib/jemalloc/src/spin.c deleted file mode 100644 index 24372c26c949..000000000000 --- a/contrib/jemalloc/src/spin.c +++ /dev/null @@ -1,4 +0,0 @@ -#define JEMALLOC_SPIN_C_ -#include "jemalloc/internal/jemalloc_preamble.h" - -#include "jemalloc/internal/spin.h" diff --git a/lib/libc/stdlib/jemalloc/Makefile.inc b/lib/libc/stdlib/jemalloc/Makefile.inc index 0c64c8e537fa..b9adf47b9559 100644 --- a/lib/libc/stdlib/jemalloc/Makefile.inc +++ b/lib/libc/stdlib/jemalloc/Makefile.inc @@ -5,7 +5,7 @@ JEMALLOCSRCS:= jemalloc.c arena.c background_thread.c base.c bitmap.c ckh.c \ ctl.c extent.c extent_dss.c extent_mmap.c hash.c hooks.c large.c \ malloc_io.c mutex.c mutex_pool.c nstime.c pages.c prng.c prof.c \ - rtree.c spin.c stats.c sz.c tcache.c ticker.c tsd.c witness.c + rtree.c stats.c sz.c tcache.c ticker.c tsd.c witness.c SYM_MAPS+=${LIBC_SRCTOP}/stdlib/jemalloc/Symbol.map