Date: Wed, 5 Oct 2016 20:17:39 +0000 (UTC) From: Matthias Andree <mandree@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423388 - in head/databases/db6: . files Message-ID: <201610052017.u95KHdHA094171@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mandree Date: Wed Oct 5 20:17:39 2016 New Revision: 423388 URL: https://svnweb.freebsd.org/changeset/ports/423388 Log: 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 Modified: head/databases/db6/Makefile head/databases/db6/files/patch-src_dbinc_mutex__int.h Modified: head/databases/db6/Makefile ============================================================================== --- head/databases/db6/Makefile Wed Oct 5 20:17:34 2016 (r423387) +++ head/databases/db6/Makefile Wed Oct 5 20:17:39 2016 (r423388) @@ -3,7 +3,7 @@ PORTNAME= db6 PORTVERSION= 6.2.23 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases java MASTER_SITES= http://download.oracle.com/berkeley-db/ PKGNAMEPREFIX?= @@ -64,12 +64,6 @@ DOCS_INSTALL_TARGET= install_docs .include <bsd.port.options.mk> -.if ${ARCH:Marm*} && empty(ARCH:Marmv6*) -# db6 uses LDREX/STREX instructions for mutexes on ARM, -# which are unavailable before ARMv6. -CONFIGURE_ARGS+= --enable-posixmutexes -.endif - post-patch: ${REINPLACE_CMD} -e '/^DOCLIST/{s/csharp//;}' ${WRKSRC}/../dist/Makefile.in ${REINPLACE_CMD} -Ee 's/[[:<:]]atomic_init[[:>:]]/db_atomic_init/g' \ Modified: head/databases/db6/files/patch-src_dbinc_mutex__int.h ============================================================================== --- head/databases/db6/files/patch-src_dbinc_mutex__int.h Wed Oct 5 20:17:34 2016 (r423387) +++ head/databases/db6/files/patch-src_dbinc_mutex__int.h Wed Oct 5 20:17:39 2016 (r423388) @@ -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) :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610052017.u95KHdHA094171>