2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

lock: Introduce futex_t and appropriate helpers

Instead of open-coded u32 variables poking lets use
futex_t type and appropriate helpers where needed.

This should increase readability.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrey Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-03-26 23:11:00 +04:00
committed by Pavel Emelyanov
parent 82b7c07ca9
commit dc848fae7a
6 changed files with 115 additions and 123 deletions

View File

@@ -3,6 +3,7 @@
#include "compiler.h"
#include "types.h"
#include "lock.h"
#include "list.h"
#include "image.h"
@@ -25,8 +26,8 @@ struct fdinfo_desc {
u64 id;
u64 addr;
int pid;
u32 real_pid; /* futex */
u32 users; /* futex */
futex_t real_pid;
futex_t users;
struct list_head list;
};
@@ -34,7 +35,7 @@ struct fdinfo_list_entry {
struct list_head list;
int fd;
int pid;
u32 real_pid;
futex_t real_pid;
};
extern int prepare_fds(int pid);