ia64/xen-unstable

changeset 6798:5cd24dd33033

Add ia64 header for synch_bitops.h
author djm@kirby.fc.hp.com
date Tue Sep 13 13:08:00 2005 -0600 (2005-09-13)
parents b35215021b32
children 2c823d27cf33
files linux-2.6-xen-sparse/include/asm-xen/asm-ia64/synch_bitops.h
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/synch_bitops.h	Tue Sep 13 13:08:00 2005 -0600
     1.3 @@ -0,0 +1,59 @@
     1.4 +#ifndef __XEN_SYNCH_BITOPS_H__
     1.5 +#define __XEN_SYNCH_BITOPS_H__
     1.6 +
     1.7 +/*
     1.8 + * Copyright 1992, Linus Torvalds.
     1.9 + * Heavily modified to provide guaranteed strong synchronisation
    1.10 + * when communicating with Xen or other guest OSes running on other CPUs.
    1.11 + */
    1.12 +
    1.13 +#include <linux/config.h>
    1.14 +
    1.15 +#define ADDR (*(volatile long *) addr)
    1.16 +
    1.17 +static __inline__ void synch_set_bit(int nr, volatile void * addr)
    1.18 +{
    1.19 +	set_bit(nr, addr);
    1.20 +}
    1.21 +
    1.22 +static __inline__ void synch_clear_bit(int nr, volatile void * addr)
    1.23 +{
    1.24 +	clear_bit(nr, addr);
    1.25 +}
    1.26 +
    1.27 +static __inline__ void synch_change_bit(int nr, volatile void * addr)
    1.28 +{
    1.29 +	change_bit(nr, addr);
    1.30 +}
    1.31 +
    1.32 +static __inline__ int synch_test_and_set_bit(int nr, volatile void * addr)
    1.33 +{
    1.34 +    return test_and_set_bit(nr, addr);
    1.35 +}
    1.36 +
    1.37 +static __inline__ int synch_test_and_clear_bit(int nr, volatile void * addr)
    1.38 +{
    1.39 +    return test_and_clear_bit(nr, addr);
    1.40 +}
    1.41 +
    1.42 +static __inline__ int synch_test_and_change_bit(int nr, volatile void * addr)
    1.43 +{
    1.44 +    return test_and_change_bit(nr, addr);
    1.45 +}
    1.46 +
    1.47 +static __inline__ int synch_const_test_bit(int nr, const volatile void * addr)
    1.48 +{
    1.49 +    return test_bit(nr, addr);
    1.50 +}
    1.51 +
    1.52 +static __inline__ int synch_var_test_bit(int nr, volatile void * addr)
    1.53 +{
    1.54 +    return test_bit(nr, addr);
    1.55 +}
    1.56 +
    1.57 +#define synch_test_bit(nr,addr) \
    1.58 +(__builtin_constant_p(nr) ? \
    1.59 + synch_const_test_bit((nr),(addr)) : \
    1.60 + synch_var_test_bit((nr),(addr)))
    1.61 +
    1.62 +#endif /* __XEN_SYNCH_BITOPS_H__ */