From c7b04f713ad19008e52328627ff7e7fd95fccf6c Mon Sep 17 00:00:00 2001 From: cognet Date: Thu, 7 Apr 2005 22:06:05 +0000 Subject: Use the new atomic_cmpset_32(). --- lib/libthr/arch/arm/include/pthread_md.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib/libthr/arch/arm/include/pthread_md.h') diff --git a/lib/libthr/arch/arm/include/pthread_md.h b/lib/libthr/arch/arm/include/pthread_md.h index 626d567..d9deff9 100644 --- a/lib/libthr/arch/arm/include/pthread_md.h +++ b/lib/libthr/arch/arm/include/pthread_md.h @@ -37,8 +37,6 @@ #include #include -static __inline int atomic_cmpset_32(volatile uint32_t *, uint32_t, uint32_t); - #include #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) @@ -87,20 +85,4 @@ _get_curthread(void) extern struct umtx arm_umtx; -static __inline int -atomic_cmpset_32(volatile uint32_t *dst, uint32_t old, uint32_t newval) -{ - int ret; - - _umtx_lock(&arm_umtx); - arm_umtx.u_owner = (void*)((uint32_t)arm_umtx.u_owner | UMTX_CONTESTED); - if (*dst == old) { - *dst = newval; - ret = 1; - } else - ret = 0; - _umtx_unlock(&arm_umtx); - return (ret); -} - #endif /* _PTHREAD_MD_H_ */ -- cgit v1.1