Commit 77a6fcb9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

kcmp: Beautify kcmp-ids.h

 - aling memebers
 - use pid_t type for PIDs
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 6cb36a1e
...@@ -2,27 +2,28 @@ ...@@ -2,27 +2,28 @@
#define __CR_KCMP_IDS_H__ #define __CR_KCMP_IDS_H__
#include <stdint.h> #include <stdint.h>
#include <sys/types.h>
#include "kcmp.h" #include "kcmp.h"
struct kid_tree { struct kid_tree {
struct rb_root root; struct rb_root root;
unsigned kcmp_type; unsigned int kcmp_type;
unsigned long subid; unsigned long subid;
}; };
#define DECLARE_KCMP_TREE(name, type) \ #define DECLARE_KCMP_TREE(name, type) \
struct kid_tree name = { \ struct kid_tree name = { \
.root = RB_ROOT, \ .root = RB_ROOT, \
.kcmp_type = type, \ .kcmp_type = type, \
.subid = 1, \ .subid = 1, \
} }
struct kid_elem { struct kid_elem {
int pid; pid_t pid;
unsigned genid; unsigned int genid;
unsigned idx; unsigned int idx;
}; };
extern uint32_t kid_generate_gen(struct kid_tree *tree, extern uint32_t kid_generate_gen(struct kid_tree *tree,
......
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