1 /* atops.h: Atomic SPARC operations. 2 * 3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 */ 5 #ifndef _SPARC_ATOPS_H 6 #define _SPARC_ATOPS_H 7 8 #ifdef __SMP__ 9 10 extern __inline volatile unsigned char ldstub(volatile unsigned char *lock) /* */ 11 { 12 volatile unsigned char retval; 13 14 __asm__ __volatile__("ldstub [%1], %0\n\t" : 15 "=&r" (retval) : 16 "r" (lock)); 17 return retval; 18 } 19 20 #endif 21 22 #endif