signal: Use task_is_*
[linux-2.6/mini2440.git] / include / asm-x86 / unaligned.h
blob913598d4f7611fd2ed6fa7a9d209a7348875f45d
1 #ifndef _ASM_X86_UNALIGNED_H
2 #define _ASM_X86_UNALIGNED_H
4 /*
5 * The x86 can do unaligned accesses itself.
7 * The strange macros are there to make sure these can't
8 * be misused in a way that makes them not work on other
9 * architectures where unaligned accesses aren't as simple.
12 /**
13 * get_unaligned - get value from possibly mis-aligned location
14 * @ptr: pointer to value
16 * This macro should be used for accessing values larger in size than
17 * single bytes at locations that are expected to be improperly aligned,
18 * e.g. retrieving a u16 value from a location not u16-aligned.
20 * Note that unaligned accesses can be very expensive on some architectures.
22 #define get_unaligned(ptr) (*(ptr))
24 /**
25 * put_unaligned - put value to a possibly mis-aligned location
26 * @val: value to place
27 * @ptr: pointer to location
29 * This macro should be used for placing values larger in size than
30 * single bytes at locations that are expected to be improperly aligned,
31 * e.g. writing a u16 value to a location not u16-aligned.
33 * Note that unaligned accesses can be very expensive on some architectures.
35 #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
37 #endif /* _ASM_X86_UNALIGNED_H */