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 I got a report about this not comp...



details:   https://anonhg.NetBSD.org/src/rev/458c51284457
branches:  trunk
changeset: 750139:458c51284457
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Dec 18 22:37:18 2009 +0000

description:
I got a report about this not compiling on mips64.  While I could
not repeat the problem and while this should not be used at all on
mips64, the real fix is a little diablo in the details.  So hack
around it for now (yes, it results in only half of the locks being
used on 64bit platforms.  no biggie for a hack).

diffstat:

 sys/rump/librump/rumpkern/atomic_cas_generic.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a698648098ac -r 458c51284457 sys/rump/librump/rumpkern/atomic_cas_generic.c
--- a/sys/rump/librump/rumpkern/atomic_cas_generic.c    Fri Dec 18 21:24:13 2009 +0000
+++ b/sys/rump/librump/rumpkern/atomic_cas_generic.c    Fri Dec 18 22:37:18 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic_cas_generic.c,v 1.1 2009/01/12 02:22:55 pooka Exp $     */
+/*     $NetBSD: atomic_cas_generic.c,v 1.2 2009/12/18 22:37:18 pooka Exp $     */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atomic_cas_generic.c,v 1.1 2009/01/12 02:22:55 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atomic_cas_generic.c,v 1.2 2009/12/18 22:37:18 pooka Exp $");
 
 /*
  * This is basically common/lib/libc/atomic/atomic_init_testset.c
@@ -53,7 +53,7 @@
        __cpu_simple_lock_t *lock;
        uint32_t ret;
 
-       lock = &atomic_locks[((uint32_t)ptr >> 3) & 127];
+       lock = &atomic_locks[((uintptr_t)ptr >> 3) & 127];
        __cpu_simple_lock(lock);
        ret = *ptr;
        if (__predict_true(ret == old)) {



Home | Main Index | Thread Index | Old Index