diff options
| author | Matthias Andree <mandree@FreeBSD.org> | 2016-10-05 20:17:39 +0000 |
|---|---|---|
| committer | Matthias Andree <mandree@FreeBSD.org> | 2016-10-05 20:17:39 +0000 |
| commit | 1c0f31a22f510a5d5bc2ffa1d08db2fa1145ef0d (patch) | |
| tree | 68ef5926656d34b8921c38171be76ade8de94eda /databases/db6/files/patch-src_dbinc_mutex__int.h | |
| parent | - Bump portrevision for previous change (diff) | |
ARM: for mutexes, use machine/atomic.h primitives
The previous approach only worked on ARMv7+, this should now permit
build and use with environments shared between processes on a wider set
of ARM architectures.
Bump PORTREVISION.
PR: 213223
Submitted by: mikael.urankar@gmail.com
Diffstat (limited to 'databases/db6/files/patch-src_dbinc_mutex__int.h')
| -rw-r--r-- | databases/db6/files/patch-src_dbinc_mutex__int.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/databases/db6/files/patch-src_dbinc_mutex__int.h b/databases/db6/files/patch-src_dbinc_mutex__int.h index 750f9c3504a4..7f85db3b67eb 100644 --- a/databases/db6/files/patch-src_dbinc_mutex__int.h +++ b/databases/db6/files/patch-src_dbinc_mutex__int.h @@ -1,5 +1,28 @@ --- src/dbinc/mutex_int.h.orig 2016-03-28 19:45:54 UTC +++ src/dbinc/mutex_int.h +@@ -9,6 +9,7 @@ + #ifndef _DB_MUTEX_INT_H_ + #define _DB_MUTEX_INT_H_ + ++#include <machine/atomic.h> + #include "dbinc/atomic.h" + + #if defined(__cplusplus) +@@ -506,11 +507,11 @@ typedef unsigned int tsl_t; + #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0) + #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0) + #define MUTEX_MEMBAR(x) \ +- ({ __asm__ volatile ("dsb"); }) ++ dsb(x) + #define MEMBAR_ENTER() \ +- ({ __asm__ volatile ("dsb"); }) ++ dsb() + #define MEMBAR_EXIT() \ +- ({ __asm__ volatile ("dsb"); }) ++ dsb() + #endif + #endif + @@ -652,7 +652,7 @@ MUTEX_SET(int *tsl) { : "=&r" (__r), "+r" (tsl) : |
