aboutsummaryrefslogtreecommitdiffstats
path: root/lib/isc/x86_32
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2009-05-31 00:11:36 +0000
committerDoug Barton <dougb@FreeBSD.org>2009-05-31 00:11:36 +0000
commitb0e69f719c1db2c19fcfba96f0dac9a5a2277350 (patch)
tree72d567a9bc3fb8adcfcbaa9baedc122d53071209 /lib/isc/x86_32
parentfe9c1406ede29d1f2b9969c75785beef87a4bf87 (diff)
downloadsrc-b0e69f719c1db2c19fcfba96f0dac9a5a2277350.tar.gz
src-b0e69f719c1db2c19fcfba96f0dac9a5a2277350.zip
Vendor import of BIND 9.6.1rc1
Notes
Notes: svn path=/vendor/bind9/dist/; revision=193141
Diffstat (limited to 'lib/isc/x86_32')
-rw-r--r--lib/isc/x86_32/Makefile.in2
-rw-r--r--lib/isc/x86_32/include/Makefile.in2
-rw-r--r--lib/isc/x86_32/include/isc/Makefile.in2
-rw-r--r--lib/isc/x86_32/include/isc/atomic.h32
4 files changed, 28 insertions, 10 deletions
diff --git a/lib/isc/x86_32/Makefile.in b/lib/isc/x86_32/Makefile.in
index c8e77e43365c..324db0707291 100644
--- a/lib/isc/x86_32/Makefile.in
+++ b/lib/isc/x86_32/Makefile.in
@@ -12,7 +12,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.2.2.1 2007/09/14 04:26:38 marka Exp $
+# $Id: Makefile.in,v 1.2 2007/09/14 04:09:59 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/lib/isc/x86_32/include/Makefile.in b/lib/isc/x86_32/include/Makefile.in
index b68a76555133..f1d8bdd31a54 100644
--- a/lib/isc/x86_32/include/Makefile.in
+++ b/lib/isc/x86_32/include/Makefile.in
@@ -12,7 +12,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.2.2.1 2007/09/14 04:26:39 marka Exp $
+# $Id: Makefile.in,v 1.2 2007/09/14 04:09:59 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/lib/isc/x86_32/include/isc/Makefile.in b/lib/isc/x86_32/include/isc/Makefile.in
index 4ce057a4a110..5f116cac9d09 100644
--- a/lib/isc/x86_32/include/isc/Makefile.in
+++ b/lib/isc/x86_32/include/isc/Makefile.in
@@ -12,7 +12,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.2.2.1 2007/09/14 04:26:39 marka Exp $
+# $Id: Makefile.in,v 1.2 2007/09/14 04:09:59 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
diff --git a/lib/isc/x86_32/include/isc/atomic.h b/lib/isc/x86_32/include/isc/atomic.h
index f3136d9eaff2..bf2148cb33f5 100644
--- a/lib/isc/x86_32/include/isc/atomic.h
+++ b/lib/isc/x86_32/include/isc/atomic.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: atomic.h,v 1.2.2.3 2005/07/27 04:23:33 marka Exp $ */
+/* $Id: atomic.h,v 1.10 2008/01/24 23:47:00 tbox Exp $ */
#ifndef ISC_ATOMIC_H
#define ISC_ATOMIC_H 1
@@ -27,7 +27,7 @@
* This routine atomically increments the value stored in 'p' by 'val', and
* returns the previous value.
*/
-static inline isc_int32_t
+static __inline__ isc_int32_t
isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
isc_int32_t prev = val;
@@ -43,10 +43,28 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
return (prev);
}
+#ifdef ISC_PLATFORM_HAVEXADDQ
+static __inline__ isc_int64_t
+isc_atomic_xaddq(isc_int64_t *p, isc_int64_t val) {
+ isc_int64_t prev = val;
+
+ __asm__ volatile(
+#ifdef ISC_PLATFORM_USETHREADS
+ "lock;"
+#endif
+ "xaddq %0, %1"
+ :"=q"(prev)
+ :"m"(*p), "0"(prev)
+ :"memory", "cc");
+
+ return (prev);
+}
+#endif /* ISC_PLATFORM_HAVEXADDQ */
+
/*
* This routine atomically stores the value 'val' in 'p'.
*/
-static inline void
+static __inline__ void
isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
__asm__ volatile(
#ifdef ISC_PLATFORM_USETHREADS
@@ -54,7 +72,7 @@ isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
* xchg should automatically lock memory, but we add it
* explicitly just in case (it at least doesn't harm)
*/
- "lock;"
+ "lock;"
#endif
"xchgl %1, %0"
@@ -68,7 +86,7 @@ isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
* original value is equal to 'cmpval'. The original value is returned in any
* case.
*/
-static inline isc_int32_t
+static __inline__ isc_int32_t
isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
__asm__ volatile(
#ifdef ISC_PLATFORM_USETHREADS