Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/databases/db18/files/patch-src_dbinc_mutex__int.h
16461 views
1
--- src/dbinc/mutex_int.h.orig 2016-03-28 19:45:54 UTC
2
+++ src/dbinc/mutex_int.h
3
@@ -9,6 +9,7 @@
4
#ifndef _DB_MUTEX_INT_H_
5
#define _DB_MUTEX_INT_H_
6
7
+#include <machine/atomic.h>
8
#include "dbinc/atomic.h"
9
10
#if defined(__cplusplus)
11
@@ -506,11 +507,11 @@ typedef unsigned int tsl_t;
12
#define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
13
#define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
14
#define MUTEX_MEMBAR(x) \
15
- ({ __asm__ volatile ("dsb"); })
16
+ dsb(x)
17
#define MEMBAR_ENTER() \
18
- ({ __asm__ volatile ("dsb"); })
19
+ dsb()
20
#define MEMBAR_EXIT() \
21
- ({ __asm__ volatile ("dsb"); })
22
+ dsb()
23
#endif
24
#endif
25
26
@@ -652,7 +652,7 @@ MUTEX_SET(int *tsl) {
27
: "=&r" (__r), "+r" (tsl)
28
:
29
: "cr0", "memory");
30
- return (int)tsl;
31
+ return (tsl != 0);
32
}
33
34
static inline int
35
36