mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 00:09:15 -04:00
Oracle Berkeley DB is a family of open source embeddable databases that allows developers to incorporate within their applications a fast, scalable, transactional database engine with industrial grade reliability and availability. As a result, customers and end-users will experience an application that simply works, reliably manages data, can scale under extreme load, but requires no ongoing database administration. As a developer, you can focus on your application and be confident that Oracle Berkeley DB will manage your persistence needs. This port is derived from databases/db6 (by svn copy + edits). PR: 248415 Submitted by: Yasuhiro KIMURA
34 lines
786 B
C
34 lines
786 B
C
--- 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)
|
|
:
|
|
: "cr0", "memory");
|
|
- return (int)tsl;
|
|
+ return (tsl != 0);
|
|
}
|
|
|
|
static inline int
|