]> Zhao Yanbai Git Server - minix.git/commitdiff
common/libc: build for ARM
authorArun Thomas <arun@minix3.org>
Sat, 11 Aug 2012 15:44:21 +0000 (17:44 +0200)
committerArun Thomas <arun@minix3.org>
Sun, 12 Aug 2012 21:30:54 +0000 (23:30 +0200)
common/lib/libc/arch/arm/atomic/Makefile.inc
common/lib/libc/atomic/atomic_init_testset.c

index 9f0233780209bb207ad1d8291c4f4ae142d77094..2d1c864e94c2dc88b41ebf99db4a4aba8c4af885 100644 (file)
@@ -1,7 +1,7 @@
 #      $NetBSD: Makefile.inc,v 1.8 2009/01/04 17:54:29 pooka Exp $
 
 .if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread" \
-       || ${LIB} == "rump")
+       || ${LIB} == "rump" || (defined(__MINIX) && ${LIB} == "sys"))
 
 SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
        atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
index 9769d62b5ea355180eb087143e0a396e29bda0b4..74baecf12e4d9316f838afa3e68d9e73b4e7d37d 100644 (file)
@@ -112,11 +112,14 @@ _atomic_cas_32(volatile uint32_t *ptr, uint32_t old, uint32_t new)
 void
 __libc_atomic_init(void)
 {
+#if !defined(__minix)
        int ncpu, mib[2];
        size_t len;
+#endif
 
        _atomic_cas_fn = _atomic_cas_mp;
 
+#if !defined(__minix)
        mib[0] = CTL_HW;
        mib[1] = HW_NCPU; 
        len = sizeof(ncpu);
@@ -129,6 +132,7 @@ __libc_atomic_init(void)
                _atomic_cas_fn = _atomic_cas_up;
                return;
        }
+#endif
 }
 
 #undef atomic_cas_32