[CRIU] [PATCH 2/4] x86: atomic -- Switch to linux kernel templates

Cyrill Gorcunov gorcunov at openvz.org
Tue Aug 13 12:20:22 EDT 2013


Use same code as provided in kernel. In first place
we used own prototypes in case of simplicity (they
all were based on "lock xadd" instruction. There is
no more need for that and we can switch to well known
kernel's api.

Because kernel uses plain int type to carry atomic
counters I had to add explicit u32 type for futexes,
as well as a couple of fixes for new api usage.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 arch/arm/include/asm/atomic.h |   4 +-
 arch/x86/include/asm/atomic.h | 122 ++++++++++++++++++++++++------------------
 include/lock.h                |  28 +++++-----
 stats.c                       |   2 +-
 4 files changed, 86 insertions(+), 70 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-x86-atomic-Switch-to-linux-kernel-templates.patch
Type: text/x-patch
Size: 7282 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130813/1ca75a79/attachment-0001.bin>


More information about the CRIU mailing list