Commit e2554b90 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

arch: x86 -- Use stdint types in cmpxchng.h

travis-ci: success for Common headers
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 3564a4d0
#ifndef __CR_CMPXCHG_H__
#define __CR_CMPXCHG_H__
#include "asm/int.h"
#include <stdint.h>
#define __X86_CASE_B 1
#define __X86_CASE_W 2
......@@ -59,7 +59,7 @@
switch (size) { \
case __X86_CASE_B: \
{ \
volatile u8 *__ptr = (volatile u8 *)(ptr); \
volatile uint8_t *__ptr = (volatile uint8_t *)(ptr); \
asm volatile(lock "cmpxchgb %2,%1" \
: "=a" (__ret), "+m" (*__ptr) \
: "q" (__new), "0" (__old) \
......@@ -68,7 +68,7 @@
} \
case __X86_CASE_W: \
{ \
volatile u16 *__ptr = (volatile u16 *)(ptr); \
volatile uint16_t *__ptr = (volatile uint16_t *)(ptr); \
asm volatile(lock "cmpxchgw %2,%1" \
: "=a" (__ret), "+m" (*__ptr) \
: "r" (__new), "0" (__old) \
......@@ -77,7 +77,7 @@
} \
case __X86_CASE_L: \
{ \
volatile u32 *__ptr = (volatile u32 *)(ptr); \
volatile uint32_t *__ptr = (volatile uint32_t *)(ptr); \
asm volatile(lock "cmpxchgl %2,%1" \
: "=a" (__ret), "+m" (*__ptr) \
: "r" (__new), "0" (__old) \
......@@ -86,7 +86,7 @@
} \
case __X86_CASE_Q: \
{ \
volatile u64 *__ptr = (volatile u64 *)(ptr); \
volatile uint64_t *__ptr = (volatile uint64_t *)(ptr); \
asm volatile(lock "cmpxchgq %2,%1" \
: "=a" (__ret), "+m" (*__ptr) \
: "r" (__new), "0" (__old) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment