Skip to content

Commit

Permalink
update dependency - bug fix for native macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Sep 26, 2024
1 parent d445900 commit 21debb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8...3.14)

project(
cthread
VERSION 4.0.1.18
VERSION 4.0.1.19
DESCRIPTION "Emulated C11 threads and thread pool, with custom malloc replacement."
HOMEPAGE_URL "https://github.com/zelang-dev/cthread"
LANGUAGES C
Expand Down
2 changes: 1 addition & 1 deletion catomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ typedef unsigned char c89atomic_bool;

#define c89atomic_compiler_fence() __asm__ __volatile__("":::"memory")

#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__APPLE__)
/* Legacy GCC atomic built-ins. Everything is a full memory barrier. */
#define c89atomic_thread_fence(order) __sync_synchronize(), (void)order

Expand Down
6 changes: 1 addition & 5 deletions rpmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

#if __has_builtin(__builtin_assume)
#define rpmalloc_assume(cond) __builtin_assume(cond)
#elif defined(__GNUC__)
#elif defined(__GNUC__) && !defined(__APPLE__)
#define rpmalloc_assume(cond) \
do { \
if (!__builtin_expect(cond, 0)) \
Expand Down Expand Up @@ -94,10 +94,6 @@
//! Enable asserts
#define ENABLE_ASSERTS 0
#endif
#ifndef ENABLE_PRELOAD
//! Support preloading
#define ENABLE_PRELOAD 0
#endif
#ifndef DISABLE_UNMAP
//! Disable unmapping memory pages (also enables unlimited cache)
#define DISABLE_UNMAP 0
Expand Down

0 comments on commit 21debb2

Please sign in to comment.