On Sat, Jun 25, 2011 at 11:34:41AM +0200, Denys Vlasenko wrote:
> +#ifdef LINUX
> +/* Temporarily hijack this bit to mark tcb's we already attached */
> +# define TCB_ATTACH_DONE TCB_INSYSCALL

We are not short of unused flags yet to apply such tricks, and your patch
series makes even more room for future flags allocation.

> +#else
> +# define TCB_ATTACH_DONE 0

And this is not needed anyway, see below.

> @@ -537,6 +540,15 @@ startup_attach(void)
>                               tcp->pid);
>       } /* for each tcbtab[] */
>  
> + ret:
> +     if (TCB_ATTACH_DONE) {
> +             for (tcbi = 0; tcbi < tcbtabsize; tcbi++) {
> +                     tcp = tcbtab[tcbi];
> +                     tcp->flags &= ~TCB_ATTACH_DONE;
> +             }
> +     }
> +#undef TCB_ATTACH_DONE
> +

This new hunk should be wrapped with #ifdef LINUX, and the check for
TCB_ATTACH_DONE != 0 could be safely omitted.


-- 
ldv

Attachment: pgpofX3bTA6h4.pgp
Description: PGP signature

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to