On Thu, Sep 02, 2010 at 01:55:51AM -0700, Rob Farmer wrote:
> On Tue, Aug 31, 2010 at 2:59 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> >
> > Ok, now that I know you read everything carefully, here is the patch:
> >
> >        http://people.freebsd.org/~pjd/patches/zfs_20100831.patch.bz2
> >
> 
> buildworld on i386 (yes I know ZFS isn't ideal there):
[...]

Yes, I know about this problem, You can use attached patch or wait for
full patch, which I'll be sending later today.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
p...@freebsd.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
--- sys/cddl/compat/opensolaris/sys/atomic.h
+++ sys/cddl/compat/opensolaris/sys/atomic.h
@@ -39,10 +39,9 @@
 #ifndef __LP64__
 extern void atomic_add_64(volatile uint64_t *target, int64_t delta);
 extern void atomic_dec_64(volatile uint64_t *target);
-extern void *atomic_cas_ptr(volatile void *target, void *cmp,  void *newval);
 #endif
 #ifndef __sparc64__
-extern uint64_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
+extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp,
     uint32_t newval);
 extern uint64_t atomic_cas_64(volatile uint64_t *target, uint64_t cmp,
     uint64_t newval);
@@ -119,21 +118,19 @@
 }
 
 #ifndef COMPAT_32BIT
-#if defined(__LP64__)
+#ifdef __LP64__
 static __inline void *
 atomic_cas_ptr(volatile void *target, void *cmp,  void *newval)
 {
-	return ((void *)atomic_cas_64((volatile uint64_t *)target, (uint64_t)cmp,
-	    (uint64_t)newval));
+	return ((void *)atomic_cas_64(target, (uint64_t)cmp, (uint64_t)newval));
 }
 #else
 static __inline void *
 atomic_cas_ptr(volatile void *target, void *cmp,  void *newval)
 {
-	return ((void *)atomic_cas_32((volatile uint64_t *)target, (uint64_t)cmp,
-	    (uint64_t)newval));
+	return ((void *)atomic_cas_32(target, (uint32_t)cmp, (uint32_t)newval));
 }
 #endif
-#endif
+#endif	/* !COMPAT_32BIT */
 
 #endif	/* !_OPENSOLARIS_SYS_ATOMIC_H_ */

Attachment: pgppo82knRdQW.pgp
Description: PGP signature

Reply via email to