[CRIU] [PATCH 07/12] parasite: Extend tid_state_s structure

Pavel Emelyanov xemul at parallels.com
Fri Mar 1 13:51:19 EST 2013


On 02/28/2013 07:35 PM, Cyrill Gorcunov wrote:
> 
> In daemon mode each thread will require own
> stack to run on, thus add @stack member.
> 
> Also we will need an @id member to identify
> each thread uniquely.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  pie/parasite.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

> diff --git a/pie/parasite.c b/pie/parasite.c
> index 3b2617c..c8b5f60 100644
> --- a/pie/parasite.c
> +++ b/pie/parasite.c
> @@ -20,9 +20,11 @@ static int tsock = -1;
>  static int ctlsock = -1;
>  
>  static struct tid_state_s {
> +	unsigned int	id;

Isn't tid good enough to address thread? Why?

>  	pid_t		tid;
>  	bool		use_sig_blocked;
>  	k_rtsigset_t	sig_blocked;
> +	unsigned char	stack[PARASITE_STACK_SIZE] __aligned(8);
>  } *tid_state;
>  
>  static unsigned int nr_tid_state;


More information about the CRIU mailing list