Module Name:    src
Committed By:   pooka
Date:           Fri Dec 18 22:37:18 UTC 2009

Modified Files:
        src/sys/rump/librump/rumpkern: atomic_cas_generic.c

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/atomic_cas_generic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/atomic_cas_generic.c
diff -u src/sys/rump/librump/rumpkern/atomic_cas_generic.c:1.1 src/sys/rump/librump/rumpkern/atomic_cas_generic.c:1.2
--- src/sys/rump/librump/rumpkern/atomic_cas_generic.c:1.1	Mon Jan 12 02:22:55 2009
+++ src/sys/rump/librump/rumpkern/atomic_cas_generic.c	Fri Dec 18 22:37:18 2009
@@ -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)) {

Reply via email to