source: trunk/packages/xen-3.1/xen-3.1/tools/ioemu/patches/qemu-infrastructure @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

  • Property svn:mime-type set to text/x-patch
File size: 785 bytes
  • cpu-all.h

    diff -r ead4d7bbf711 cpu-all.h
    a b int cpu_inl(CPUState *env, int addr); 
    820820int cpu_inl(CPUState *env, int addr);
    821821#endif
    822822
     823#if defined(__i386__) || defined(__x86_64__)
     824static __inline__ void atomic_set_bit(long nr, volatile void *addr)
     825{
     826        __asm__ __volatile__(
     827                "lock ; bts %1,%0"
     828                :"=m" (*(volatile long *)addr)
     829                :"dIr" (nr));
     830}
     831static __inline__ void atomic_clear_bit(long nr, volatile void *addr)
     832{
     833        __asm__ __volatile__(
     834                "lock ; btr %1,%0"
     835                :"=m" (*(volatile long *)addr)
     836                :"dIr" (nr));
     837}
     838#endif
     839
    823840/* memory API */
    824841
    825842extern uint64_t phys_ram_size;
Note: See TracBrowser for help on using the repository browser.