>>> On 30.04.15 at 17:33, wrote:
> +static always_inline unsigned long __xadd(
> +volatile void *ptr, unsigned long v, int size)
> +{
> +switch ( size )
> +{
> +case 1:
> +asm volatile ( "lock; xaddb %b0,%1"
> + : "+r" (v), "+m" (*__xg((volatile void *
arch_fetch_and_add() atomically adds a value and returns the previous
value.
This is needed to implement ticket locks.
Signed-off-by: David Vrabel
---
xen/include/asm-x86/system.h | 48 ++
1 file changed, 48 insertions(+)
diff --git a/xen/include/asm-x