From ea968e74e8f03b1e14d863c1ea7efe8318597967 Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Wed, 14 Oct 2015 16:43:31 +0100 Subject: [PATCH] x86/xen-os: Remove unused function test_and_clear_bit --- sys/x86/include/xen/xen-os.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h index d586d76b49ef..a53589dd3c54 100644 --- a/sys/x86/include/xen/xen-os.h +++ b/sys/x86/include/xen/xen-os.h @@ -47,25 +47,6 @@ static inline void rep_nop(void) #define LOCK "" #define ADDR (*(volatile long *) addr) -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - static __inline int constant_test_bit(int nr, const volatile void * addr) { return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -- 2.39.5