2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 15:45:25 +00:00

update copyright notice

This commit is contained in:
Automatic Updater
2009-10-14 23:47:51 +00:00
parent 3493b4e0ef
commit f6cd5ef97a

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC")
* *
* Permission to use, copy, modify, and/or 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 * purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: atomic.h,v 1.7 2009/10/14 03:54:23 marka Exp $ */ /* $Id: atomic.h,v 1.8 2009/10/14 23:47:51 tbox Exp $ */
#ifndef ISC_ATOMIC_H #ifndef ISC_ATOMIC_H
#define ISC_ATOMIC_H 1 #define ISC_ATOMIC_H 1
@@ -57,17 +57,17 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
int ret; int ret;
#ifdef __GNUC__ #ifdef __GNUC__
asm("ics"); asm("ics");
#else #else
__isync(); __isync();
#endif #endif
ret = fetch_and_add((atomic_p)p, (int)val); ret = fetch_and_add((atomic_p)p, (int)val);
#ifdef __GNUC__ #ifdef __GNUC__
asm("ics"); asm("ics");
#else #else
__isync(); __isync();
#endif #endif
return (ret); return (ret);
@@ -79,23 +79,23 @@ static inline int
static int static int
#endif #endif
isc_atomic_cmpxchg(atomic_p p, int old, int new) { isc_atomic_cmpxchg(atomic_p p, int old, int new) {
int orig = old; int orig = old;
#ifdef __GNUC__ #ifdef __GNUC__
asm("ics"); asm("ics");
#else #else
__isync(); __isync();
#endif #endif
if (compare_and_swap(p, &orig, new)) if (compare_and_swap(p, &orig, new))
orig = old; orig = old;
#ifdef __GNUC__ #ifdef __GNUC__
asm("ics"); asm("ics");
#else #else
__isync(); __isync();
#endif #endif
return (orig); return (orig);
} }
#elif defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM) #elif defined(ISC_PLATFORM_USEGCCASM) || defined(ISC_PLATFORM_USEMACASM)
@@ -107,14 +107,14 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
#ifdef ISC_PLATFORM_USEMACASM #ifdef ISC_PLATFORM_USEMACASM
"1:" "1:"
"lwarx r6, 0, %1\n" "lwarx r6, 0, %1\n"
"mr %0, r6\n" "mr %0, r6\n"
"add r6, r6, %2\n" "add r6, r6, %2\n"
"stwcx. r6, 0, %1\n" "stwcx. r6, 0, %1\n"
"bne- 1b" "bne- 1b"
#else #else
"1:" "1:"
"lwarx 6, 0, %1\n" "lwarx 6, 0, %1\n"
"mr %0, 6\n" "mr %0, 6\n"
"add 6, 6, %2\n" "add 6, 6, %2\n"
"stwcx. 6, 0, %1\n" "stwcx. 6, 0, %1\n"
"bne- 1b" "bne- 1b"