summaryrefslogtreecommitdiff
path: root/lib/isc/ia64/include/isc/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/ia64/include/isc/atomic.h')
-rw-r--r--lib/isc/ia64/include/isc/atomic.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/isc/ia64/include/isc/atomic.h b/lib/isc/ia64/include/isc/atomic.h
index 20cbabdae394..f834c25da6f6 100644
--- a/lib/isc/ia64/include/isc/atomic.h
+++ b/lib/isc/ia64/include/isc/atomic.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006, 2009 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.1 2006/06/21 03:38:32 marka Exp $ */
+/* $Id: atomic.h,v 1.2.2.4 2009/06/24 02:24:13 marka Exp $ */
#ifndef ISC_ATOMIC_H
#define ISC_ATOMIC_H 1
@@ -31,7 +31,11 @@
* (e.g., 1 and -1)?
*/
static inline isc_int32_t
-isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
+#ifdef __GNUC__
+__attribute__ ((unused))
+#endif
+isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
+{
isc_int32_t prev, swapped;
for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
@@ -53,7 +57,11 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
* This routine atomically stores the value 'val' in 'p'.
*/
static inline void
-isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
+#ifdef __GNUC__
+__attribute__ ((unused))
+#endif
+isc_atomic_store(isc_int32_t *p, isc_int32_t val)
+{
__asm__ volatile(
"st4.rel %0=%1"
: "=m" (*p)
@@ -68,7 +76,11 @@ isc_atomic_store(isc_int32_t *p, isc_int32_t val) {
* case.
*/
static inline isc_int32_t
-isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
+#ifdef __GNUC__
+__attribute__ ((unused))
+#endif
+isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
+{
isc_int32_t ret;
__asm__ volatile(