-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit_hash:b19ebf58741f1e935cfd73a879bed9c90fb3b6ae
- Loading branch information
Showing
46 changed files
with
8,079 additions
and
735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
/build*/ | ||
/cmake-build-*/ | ||
/docs/ | ||
/third_party/ | ||
CMakeLists.txt.user | ||
compile_commands.json | ||
tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
project(userver-librseq) | ||
project(userver-librseq C) | ||
|
||
SET(SOURCES | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/rseq.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/config.h) | ||
src/rseq.c | ||
src/rseq-mempool.c | ||
src/smp.c | ||
) | ||
|
||
add_library(${PROJECT_NAME} OBJECT ${SOURCES}) | ||
|
||
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
) | ||
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-implicit-function-declaration) | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE _GNU_SOURCE) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES C_EXTENSIONS ON) | ||
_userver_install_targets(COMPONENT core TARGETS ${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
These headers are imported from https://github.com/compudj/librseq | ||
|
||
Commit: https://github.com/compudj/librseq/commit/40797ae3069ce08b83c4221839b53e754105be78 | ||
Commit: https://github.com/compudj/librseq/commit/1f62f2c757d10d55af2b9519a97f81ac1e5cb178 | ||
|
||
All platform libraries, except for x86, are stripped. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* SPDX-FileCopyrightText: 2016-2022 Mathieu Desnoyers <[email protected]> */ | ||
|
||
/* | ||
* rseq/arch.h | ||
*/ | ||
|
||
#include <rseq/thread-pointer.h> | ||
|
||
/* | ||
* Architecture detection using compiler defines. | ||
* | ||
* The following defines are used internally for architecture specific code. | ||
* | ||
* URCU_ARCH_X86 : All x86 variants 32 and 64 bits | ||
* URCU_ARCH_I386 : Specific to the i386 | ||
* URCU_ARCH_AMD64 : All 64 bits x86 variants | ||
* | ||
* URCU_ARCH_PPC : All PowerPC variants 32 and 64 bits | ||
* URCU_ARCH_PPC64 : Specific to 64 bits variants | ||
* | ||
* URCU_ARCH_S390 : All IBM s390 / s390x variants | ||
* URCU_ARCH_S390X : Specific to z/Architecture 64 bits | ||
* | ||
* URCU_ARCH_ARM : All ARM 32 bits variants | ||
* URCU_ARCH_AARCH64 : All ARM 64 bits variants | ||
* URCU_ARCH_MIPS : All MIPS variants | ||
* URCU_ARCH_RISCV : All RISC-V variants | ||
*/ | ||
|
||
#ifndef _RSEQ_ARCH_H | ||
#define _RSEQ_ARCH_H | ||
|
||
#if (defined(__amd64__) \ | ||
|| defined(__amd64) \ | ||
|| defined(__x86_64__) \ | ||
|| defined(__x86_64)) | ||
|
||
#define RSEQ_ARCH_X86 1 | ||
#define RSEQ_ARCH_AMD64 1 | ||
#include <rseq/arch/x86.h> | ||
|
||
#elif (defined(__i386__) || defined(__i386)) | ||
|
||
#define RSEQ_ARCH_X86 1 | ||
#include <rseq/arch/x86.h> | ||
|
||
#elif (defined(__arm__) || defined(__arm)) | ||
|
||
#define RSEQ_ARCH_ARM 1 | ||
#include <rseq/arch/arm.h> | ||
|
||
#elif defined(__aarch64__) | ||
|
||
#define RSEQ_ARCH_AARCH64 1 | ||
#include <rseq/arch/aarch64.h> | ||
|
||
#elif (defined(__powerpc64__) || defined(__ppc64__)) | ||
|
||
#define RSEQ_ARCH_PPC 1 | ||
#define RSEQ_ARCH_PPC64 1 | ||
#include <rseq/arch/ppc.h> | ||
|
||
#elif (defined(__powerpc__) \ | ||
|| defined(__powerpc) \ | ||
|| defined(__ppc__)) | ||
|
||
#define RSEQ_ARCH_PPC 1 | ||
#include <rseq/arch/ppc.h> | ||
|
||
#elif (defined(__mips__) || defined(__mips)) | ||
|
||
#define RSEQ_ARCH_MIPS 1 | ||
#include <rseq/arch/mips.h> | ||
|
||
#elif defined(__s390__) | ||
|
||
# if (defined(__s390x__) || defined(__zarch__)) | ||
# define RSEQ_ARCH_S390X 1 | ||
# endif | ||
|
||
#define RSEQ_ARCH_S390 1 | ||
#include <rseq/arch/s390.h> | ||
|
||
#elif defined(__riscv) | ||
|
||
#define RSEQ_ARCH_RISCV 1 | ||
#include <rseq/arch/riscv.h> | ||
|
||
#else | ||
#error "Cannot build: unrecognized architecture, see <rseq/arch.h>." | ||
#endif | ||
|
||
#endif /* _RSEQ_ARCH_H */ |
Oops, something went wrong.