diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /contrib/libs/jemalloc | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/jemalloc')
-rw-r--r-- | contrib/libs/jemalloc/hack.cpp | 28 | ||||
-rw-r--r-- | contrib/libs/jemalloc/hack.h | 30 | ||||
-rw-r--r-- | contrib/libs/jemalloc/include/jemalloc/internal/jemalloc_internal_defs-linux.h | 4 | ||||
-rw-r--r-- | contrib/libs/jemalloc/reg_zone.cpp | 10 | ||||
-rw-r--r-- | contrib/libs/jemalloc/spinlock.h | 30 | ||||
-rw-r--r-- | contrib/libs/jemalloc/ya.make | 4 |
6 files changed, 53 insertions, 53 deletions
diff --git a/contrib/libs/jemalloc/hack.cpp b/contrib/libs/jemalloc/hack.cpp index 39fd018eb0..900856d353 100644 --- a/contrib/libs/jemalloc/hack.cpp +++ b/contrib/libs/jemalloc/hack.cpp @@ -1,14 +1,14 @@ -#include "hack.h" - -#include <util/system/yield.cpp> -#include <util/system/spinlock.cpp> - -#include "spinlock.h" - -void SPIN_L(spinlock_t* l) { - AcquireAdaptiveLock(l); -} - -void SPIN_U(spinlock_t* l) { - ReleaseAdaptiveLock(l); -} +#include "hack.h" + +#include <util/system/yield.cpp> +#include <util/system/spinlock.cpp> + +#include "spinlock.h" + +void SPIN_L(spinlock_t* l) { + AcquireAdaptiveLock(l); +} + +void SPIN_U(spinlock_t* l) { + ReleaseAdaptiveLock(l); +} diff --git a/contrib/libs/jemalloc/hack.h b/contrib/libs/jemalloc/hack.h index 160b79bebe..3b172a2da2 100644 --- a/contrib/libs/jemalloc/hack.h +++ b/contrib/libs/jemalloc/hack.h @@ -1,21 +1,21 @@ #pragma once - -#include <sys/types.h> - -#if defined(__cplusplus) -extern "C" { -#endif - -#define AcquireAdaptiveLockSlow AllocAcquireAdaptiveLockSlow -#define SchedYield AllocSchedYield -#define ThreadYield AllocThreadYield -#define NSystemInfo NAllocSystemInfo - + +#include <sys/types.h> + +#if defined(__cplusplus) +extern "C" { +#endif + +#define AcquireAdaptiveLockSlow AllocAcquireAdaptiveLockSlow +#define SchedYield AllocSchedYield +#define ThreadYield AllocThreadYield +#define NSystemInfo NAllocSystemInfo + #ifdef _MSC_VER # define __restrict__ __restrict # define JEMALLOC_EXPORT #endif -#if defined(__cplusplus) -}; -#endif +#if defined(__cplusplus) +}; +#endif diff --git a/contrib/libs/jemalloc/include/jemalloc/internal/jemalloc_internal_defs-linux.h b/contrib/libs/jemalloc/include/jemalloc/internal/jemalloc_internal_defs-linux.h index b7d31ebedf..28cc151f07 100644 --- a/contrib/libs/jemalloc/include/jemalloc/internal/jemalloc_internal_defs-linux.h +++ b/contrib/libs/jemalloc/include/jemalloc/internal/jemalloc_internal_defs-linux.h @@ -38,9 +38,9 @@ /* 1 if CPU_SPINWAIT is defined, 0 otherwise. */ #define HAVE_CPU_SPINWAIT 1 #else -#define CPU_SPINWAIT +#define CPU_SPINWAIT #define HAVE_CPU_SPINWAIT 0 -#endif +#endif /* * Number of significant bits in virtual addresses. This may be less than the diff --git a/contrib/libs/jemalloc/reg_zone.cpp b/contrib/libs/jemalloc/reg_zone.cpp index 7946b87928..6a7b9d69e1 100644 --- a/contrib/libs/jemalloc/reg_zone.cpp +++ b/contrib/libs/jemalloc/reg_zone.cpp @@ -1,23 +1,23 @@ #include <util/system/compiler.h> extern "C" void je_zone_register(); - + static volatile bool initialized = false; -namespace { +namespace { struct TInit { - inline TInit() { + inline TInit() { if (!initialized) { je_zone_register(); initialized = true; } - } + } }; void zone_register() { static TInit init; } -} +} extern "C" { void je_assure_zone_register() { diff --git a/contrib/libs/jemalloc/spinlock.h b/contrib/libs/jemalloc/spinlock.h index 1430b9bb8f..93fcf10e12 100644 --- a/contrib/libs/jemalloc/spinlock.h +++ b/contrib/libs/jemalloc/spinlock.h @@ -1,21 +1,21 @@ #pragma once - + #include <util/system/defaults.h> - + typedef volatile intptr_t spinlock_t; -#define SPIN_L AllocAcquireAdaptiveLock -#define SPIN_U AllocReleaseAdaptiveLock - +#define SPIN_L AllocAcquireAdaptiveLock +#define SPIN_U AllocReleaseAdaptiveLock + #define _SPINLOCK_INITIALIZER 0 -#define _SPINUNLOCK(_lck) SPIN_U(_lck) +#define _SPINUNLOCK(_lck) SPIN_U(_lck) #define _SPINLOCK(_lck) SPIN_L(_lck) - -#if defined(__cplusplus) -extern "C" { -#endif - void SPIN_L(spinlock_t* lock); - void SPIN_U(spinlock_t* lock); -#if defined(__cplusplus) -}; -#endif + +#if defined(__cplusplus) +extern "C" { +#endif + void SPIN_L(spinlock_t* lock); + void SPIN_U(spinlock_t* lock); +#if defined(__cplusplus) +}; +#endif diff --git a/contrib/libs/jemalloc/ya.make b/contrib/libs/jemalloc/ya.make index ffb0e62400..586de30ab0 100644 --- a/contrib/libs/jemalloc/ya.make +++ b/contrib/libs/jemalloc/ya.make @@ -1,12 +1,12 @@ # Generated by devtools/yamaker from nixpkgs 21.11. LIBRARY() - + OWNER( g:contrib g:cpp-contrib ) - + VERSION(5.2.1) ORIGINAL_SOURCE(https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2) |