X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fvserver%2Fcontext.h;h=fffb3b90cb7e157d475d638568d9eb7264746aa3;hb=d46bc780027c5439db9f72d42c0732775b53925a;hp=76926038e9ee5f9615c07a5128c89c102ef815f7;hpb=a8e794ca871505c8ea96cc102f4ad555c5231d7f;p=linux-2.6.git diff --git a/include/linux/vserver/context.h b/include/linux/vserver/context.h index 76926038e..fffb3b90c 100644 --- a/include/linux/vserver/context.h +++ b/include/linux/vserver/context.h @@ -12,6 +12,7 @@ #include #include +#include #define _VX_INFO_DEF_ #include "cvirt.h" @@ -20,9 +21,11 @@ #undef _VX_INFO_DEF_ struct vx_info { - struct list_head vx_list; /* linked list of contexts */ + struct hlist_node vx_hlist; /* linked list of contexts */ + struct rcu_head vx_rcu; /* the rcu head */ xid_t vx_id; /* context id */ - atomic_t vx_refcount; /* refcount */ + atomic_t vx_usecnt; /* usage count */ + atomic_t vx_refcnt; /* reference count */ struct vx_info *vx_parent; /* parent context */ struct namespace *vx_namespace; /* private namespace */ @@ -42,10 +45,6 @@ struct vx_info { }; -extern spinlock_t vxlist_lock; -extern struct list_head vx_infos; - - #define VX_ADMIN 0x0001 #define VX_WATCH 0x0002 #define VX_DUMMY 0x0008 @@ -63,11 +62,14 @@ extern struct list_head vx_infos; #define VX_ATR_MASK 0x0F00 -void free_vx_info(struct vx_info *); +extern void rcu_free_vx_info(void *); +extern void unhash_vx_info(struct vx_info *); + +extern struct vx_info *locate_vx_info(int); +extern struct vx_info *locate_or_create_vx_info(int); -extern struct vx_info *find_vx_info(int); -extern struct vx_info *find_or_create_vx_info(int); -extern int vx_info_id_valid(int); +extern int get_xid_list(int, unsigned int *, int); +extern int vx_info_is_hashed(xid_t); extern int vx_migrate_task(struct task_struct *, struct vx_info *);