OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [atops.h] - Blame information for rev 1633

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* 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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.