Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern rename atomic_cas_up to rump_atomi...



details:   https://anonhg.NetBSD.org/src/rev/27c5383792ce
branches:  trunk
changeset: 758959:27c5383792ce
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Nov 22 10:50:50 2010 +0000

description:
rename atomic_cas_up to rump_atomic_cas_up to avoid collisions

diffstat:

 sys/rump/librump/rumpkern/Makefile.rumpkern    |   4 +-
 sys/rump/librump/rumpkern/atomic_cas_up.c      |  60 --------------------------
 sys/rump/librump/rumpkern/rump_atomic_cas_up.c |  60 ++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 62 deletions(-)

diffs (146 lines):

diff -r 0aaaa7446add -r 27c5383792ce sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern       Mon Nov 22 09:53:01 2010 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern       Mon Nov 22 10:50:50 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.rumpkern,v 1.101 2010/11/21 22:17:24 pooka Exp $
+#      $NetBSD: Makefile.rumpkern,v 1.102 2010/11/22 10:50:50 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -184,7 +184,7 @@
 .ifdef RUMP_SMP
 SRCS+=         atomic_cas_generic.c
 .else
-SRCS+=         atomic_cas_up.c
+SRCS+=         rump_atomic_cas_up.c
 .endif
 .endif
 
diff -r 0aaaa7446add -r 27c5383792ce sys/rump/librump/rumpkern/atomic_cas_up.c
--- a/sys/rump/librump/rumpkern/atomic_cas_up.c Mon Nov 22 09:53:01 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*     $NetBSD: atomic_cas_up.c,v 1.1 2010/11/21 21:46:43 pooka Exp $  */
-
-/*-
- * Copyright (c) 2010 Antti Kantee.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atomic_cas_up.c,v 1.1 2010/11/21 21:46:43 pooka Exp $");
-
-/*
- * Uniprocessor version of atomic CAS.  Since there is no preemption
- * in rump, this is a piece of cake.
- */
-
-#include <sys/types.h>
-
-uint32_t rumpup_cas_32_up(volatile uint32_t *ptr, uint32_t, uint32_t);
-
-uint32_t
-rumpup_cas_32_up(volatile uint32_t *ptr, uint32_t old, uint32_t new)
-{
-       uint32_t ret;
-
-       ret = *ptr;
-       if (__predict_true(ret == old)) {
-               *ptr = new;
-       }
-
-       return ret;
-}
-
-__strong_alias(atomic_cas_32,rumpup_cas_32_up)
-__strong_alias(atomic_cas_uint,rumpup_cas_32_up)
-__strong_alias(atomic_cas_ulong,rumpup_cas_32_up)
-__strong_alias(atomic_cas_ptr,rumpup_cas_32_up)
-__strong_alias(atomic_cas_32_ni,rumpup_cas_32_up)
-__strong_alias(atomic_cas_uint_ni,rumpup_cas_32_up)
-__strong_alias(atomic_cas_ulong_ni,rumpup_cas_32_up)
-__strong_alias(atomic_cas_ptr_ni,rumpup_cas_32_up)
diff -r 0aaaa7446add -r 27c5383792ce sys/rump/librump/rumpkern/rump_atomic_cas_up.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/librump/rumpkern/rump_atomic_cas_up.c    Mon Nov 22 10:50:50 2010 +0000
@@ -0,0 +1,60 @@
+/*     $NetBSD: rump_atomic_cas_up.c,v 1.1 2010/11/22 10:50:51 pooka Exp $     */
+
+/*-
+ * Copyright (c) 2010 Antti Kantee.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: rump_atomic_cas_up.c,v 1.1 2010/11/22 10:50:51 pooka Exp $");
+
+/*
+ * Uniprocessor version of atomic CAS.  Since there is no preemption
+ * in rump, this is a piece of cake.
+ */
+
+#include <sys/types.h>
+
+uint32_t rumpup_cas_32_up(volatile uint32_t *ptr, uint32_t, uint32_t);
+
+uint32_t
+rumpup_cas_32_up(volatile uint32_t *ptr, uint32_t old, uint32_t new)
+{
+       uint32_t ret;
+
+       ret = *ptr;
+       if (__predict_true(ret == old)) {
+               *ptr = new;
+       }
+
+       return ret;
+}
+
+__strong_alias(atomic_cas_32,rumpup_cas_32_up)
+__strong_alias(atomic_cas_uint,rumpup_cas_32_up)
+__strong_alias(atomic_cas_ulong,rumpup_cas_32_up)
+__strong_alias(atomic_cas_ptr,rumpup_cas_32_up)
+__strong_alias(atomic_cas_32_ni,rumpup_cas_32_up)
+__strong_alias(atomic_cas_uint_ni,rumpup_cas_32_up)
+__strong_alias(atomic_cas_ulong_ni,rumpup_cas_32_up)
+__strong_alias(atomic_cas_ptr_ni,rumpup_cas_32_up)



Home | Main Index | Thread Index | Old Index