diff options
author | peter <peter@FreeBSD.org> | 2008-07-12 05:00:28 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2008-07-12 05:00:28 +0000 |
commit | ba8f85b49c38af7bc2a9acdef5dcde2de008d25e (patch) | |
tree | ceac31a567976fd5866cb5791b059781f6e045de /contrib/bind9/lib/isc/x86_32 | |
parent | 0f328cea2580ffb8f9e363be671a517787111472 (diff) | |
download | FreeBSD-src-ba8f85b49c38af7bc2a9acdef5dcde2de008d25e.zip FreeBSD-src-ba8f85b49c38af7bc2a9acdef5dcde2de008d25e.tar.gz |
Flatten bind9 vendor work area
Diffstat (limited to 'contrib/bind9/lib/isc/x86_32')
-rw-r--r-- | contrib/bind9/lib/isc/x86_32/Makefile.in | 24 | ||||
-rw-r--r-- | contrib/bind9/lib/isc/x86_32/include/Makefile.in | 24 | ||||
-rw-r--r-- | contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in | 36 | ||||
-rw-r--r-- | contrib/bind9/lib/isc/x86_32/include/isc/atomic.h | 158 |
4 files changed, 0 insertions, 242 deletions
diff --git a/contrib/bind9/lib/isc/x86_32/Makefile.in b/contrib/bind9/lib/isc/x86_32/Makefile.in deleted file mode 100644 index c8e77e4..0000000 --- a/contrib/bind9/lib/isc/x86_32/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC") -# -# 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. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# 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 $ - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = include -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/contrib/bind9/lib/isc/x86_32/include/Makefile.in b/contrib/bind9/lib/isc/x86_32/include/Makefile.in deleted file mode 100644 index b68a765..0000000 --- a/contrib/bind9/lib/isc/x86_32/include/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC") -# -# 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. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# 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 $ - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -SUBDIRS = isc -TARGETS = - -@BIND9_MAKE_RULES@ diff --git a/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in b/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in deleted file mode 100644 index 4ce057a..0000000 --- a/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2007 Internet Systems Consortium, Inc. ("ISC") -# -# 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. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# 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 $ - -srcdir = @srcdir@ -VPATH = @srcdir@ -top_srcdir = @top_srcdir@ - -@BIND9_VERSION@ - -HEADERS = atomic.h - -SUBDIRS = -TARGETS = - -@BIND9_MAKE_RULES@ - -installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}/isc - -install:: installdirs - for i in ${HEADERS}; do \ - ${INSTALL_DATA} $(srcdir)/$$i ${DESTDIR}${includedir}/isc ; \ - done diff --git a/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h b/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h deleted file mode 100644 index f3136d9..0000000 --- a/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and 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. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* $Id: atomic.h,v 1.2.2.3 2005/07/27 04:23:33 marka Exp $ */ - -#ifndef ISC_ATOMIC_H -#define ISC_ATOMIC_H 1 - -#include <isc/platform.h> -#include <isc/types.h> - -#ifdef ISC_PLATFORM_USEGCCASM -/* - * This routine atomically increments the value stored in 'p' by 'val', and - * returns the previous value. - */ -static inline isc_int32_t -isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { - isc_int32_t prev = val; - - __asm__ volatile( -#ifdef ISC_PLATFORM_USETHREADS - "lock;" -#endif - "xadd %0, %1" - :"=q"(prev) - :"m"(*p), "0"(prev) - :"memory", "cc"); - - return (prev); -} - -/* - * This routine atomically stores the value 'val' in 'p'. - */ -static inline void -isc_atomic_store(isc_int32_t *p, isc_int32_t val) { - __asm__ volatile( -#ifdef ISC_PLATFORM_USETHREADS - /* - * xchg should automatically lock memory, but we add it - * explicitly just in case (it at least doesn't harm) - */ - "lock;" -#endif - - "xchgl %1, %0" - : - : "r"(val), "m"(*p) - : "memory"); -} - -/* - * This routine atomically replaces the value in 'p' with 'val', if the - * original value is equal to 'cmpval'. The original value is returned in any - * case. - */ -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 - "lock;" -#endif - "cmpxchgl %1, %2" - : "=a"(cmpval) - : "r"(val), "m"(*p), "a"(cmpval) - : "memory"); - - return (cmpval); -} - -#elif defined(ISC_PLATFORM_USESTDASM) -/* - * The followings are "generic" assembly code which implements the same - * functionality in case the gcc extension cannot be used. It should be - * better to avoid inlining below, since we directly refer to specific - * positions of the stack frame, which would not actually point to the - * intended address in the embedded mnemonic. - */ -#include <isc/util.h> /* for 'UNUSED' macro */ - -static isc_int32_t -isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { - UNUSED(p); - UNUSED(val); - - __asm ( - "movl 8(%ebp), %ecx\n" - "movl 12(%ebp), %edx\n" -#ifdef ISC_PLATFORM_USETHREADS - "lock;" -#endif - "xadd %edx, (%ecx)\n" - - /* - * set the return value directly in the register so that we - * can avoid guessing the correct position in the stack for a - * local variable. - */ - "movl %edx, %eax" - ); -} - -static void -isc_atomic_store(isc_int32_t *p, isc_int32_t val) { - UNUSED(p); - UNUSED(val); - - __asm ( - "movl 8(%ebp), %ecx\n" - "movl 12(%ebp), %edx\n" -#ifdef ISC_PLATFORM_USETHREADS - "lock;" -#endif - "xchgl (%ecx), %edx\n" - ); -} - -static isc_int32_t -isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { - UNUSED(p); - UNUSED(cmpval); - UNUSED(val); - - __asm ( - "movl 8(%ebp), %ecx\n" - "movl 12(%ebp), %eax\n" /* must be %eax for cmpxchgl */ - "movl 16(%ebp), %edx\n" -#ifdef ISC_PLATFORM_USETHREADS - "lock;" -#endif - - /* - * If (%ecx) == %eax then (%ecx) := %edx. - % %eax is set to old (%ecx), which will be the return value. - */ - "cmpxchgl %edx, (%ecx)" - ); -} -#else /* !ISC_PLATFORM_USEGCCASM && !ISC_PLATFORM_USESTDASM */ - -#error "unsupported compiler. disable atomic ops by --disable-atomic" - -#endif -#endif /* ISC_ATOMIC_H */ |