diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2018-05-02 01:27:12 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2018-05-02 01:27:12 +0000 |
commit | 9bb490e4d1fc8cd87ea0db24f93bf555b1f308cf (patch) | |
tree | 1a246c06bef78a1f57c64201f25868dd6ca4627b /databases/foundationdb/files/patch-flow_ThreadPrimitives.h | |
parent | Add foundationdb. (diff) |
Add foundationdb, yet another distributed database from apple.
Notes
Notes:
svn path=/head/; revision=468809
Diffstat (limited to 'databases/foundationdb/files/patch-flow_ThreadPrimitives.h')
-rw-r--r-- | databases/foundationdb/files/patch-flow_ThreadPrimitives.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/databases/foundationdb/files/patch-flow_ThreadPrimitives.h b/databases/foundationdb/files/patch-flow_ThreadPrimitives.h new file mode 100644 index 000000000000..137a336513d6 --- /dev/null +++ b/databases/foundationdb/files/patch-flow_ThreadPrimitives.h @@ -0,0 +1,34 @@ +--- flow/ThreadPrimitives.h.orig 2018-04-22 14:33:39 UTC ++++ flow/ThreadPrimitives.h +@@ -25,7 +25,7 @@ + #include "Error.h" + #include "Trace.h" + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + #include <semaphore.h> + #endif + +@@ -63,11 +63,11 @@ public: + #endif + } + void leave() { +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + __sync_synchronize(); + #endif + isLocked = 0; +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + __sync_synchronize(); + #endif + #if VALGRIND +@@ -117,6 +117,8 @@ private: + void* ev; + #elif defined(__linux__) + sem_t sem; ++#elif defined(__FreeBSD__) ++ sem_t sem; + #elif defined(__APPLE__) + mach_port_t self; + semaphore_t sem; |