pre-2.3.4..
[davej-history.git] / include / asm-sparc / atops.h
blob0bb70752de7193ddbf0b00eb72851752f1788a1d
1 /* atops.h: Atomic SPARC operations.
3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
4 */
5 #ifndef _SPARC_ATOPS_H
6 #define _SPARC_ATOPS_H
8 #ifdef __SMP__
10 extern __inline__ __volatile__ unsigned char ldstub(volatile unsigned char *lock)
12 volatile unsigned char retval;
14 __asm__ __volatile__("ldstub [%1], %0\n\t" :
15 "=&r" (retval) :
16 "r" (lock));
17 return retval;
20 #endif
22 #endif