diff options
author | Keir Fraser <keir@xensource.com> | 2007-04-06 10:10:45 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-04-06 10:10:45 +0100 |
commit | 14f8dcea987be144af468acc15ec5aba1e37f406 (patch) | |
tree | 19c31b0f0bda53109aeae5ca3907df647d8073d9 /xen/include/asm-x86/types.h | |
parent | 8a2926fac23e268fc91b4129af11aa22829ea09c (diff) | |
download | xen-14f8dcea987be144af468acc15ec5aba1e37f406.tar.gz xen-14f8dcea987be144af468acc15ec5aba1e37f406.tar.bz2 xen-14f8dcea987be144af468acc15ec5aba1e37f406.zip |
xen: Make bool_t an arch-dep definition, and define macros
specifically for atomic test-and-modify operations on bool_t.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/types.h')
-rw-r--r-- | xen/include/asm-x86/types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/include/asm-x86/types.h b/xen/include/asm-x86/types.h index 1ebe5a16d9..fd2fd069b6 100644 --- a/xen/include/asm-x86/types.h +++ b/xen/include/asm-x86/types.h @@ -52,6 +52,10 @@ typedef unsigned long paddr_t; typedef unsigned long size_t; +typedef char bool_t; +#define test_and_set_bool(b) xchg(&(b), 1) +#define test_and_clear_bool(b) xchg(&(b), 0) + #endif /* __ASSEMBLY__ */ #if defined(__i386__) |