[CRIU] Re: [PATCH 2/2] futex: Add FUTEX_WAIT_ABORT constant
Cyrill Gorcunov
gorcunov at openvz.org
Mon Apr 2 05:34:07 EDT 2012
On Mon, Apr 02, 2012 at 12:25:19PM +0400, Andrew Vagin wrote:
> >
> > +#define FUTEX_WAIT_ABORT (-1)
>
> I don't want to have this contant, because it's not a common logic.
> Yes, we have one place where futex is used by this way.
>
> But if we want to have this contant, we should detect it in a place,
> where we wait this futex.
>
> > +
> > typedef struct {
> > s32 raw;
> > } futex_t;
Then I guess we could add
#define FUTEX_ABORT (0x80000000)
static void futex_set_abort(futex_t *f)
{
futex_set_and_wake(f, futex_get(f) | FUTEX_ABORT);
}
and in futex_wait_if_cond check for
...
if (tmp & FUTEX_ABORT)
break;
...
Cyrill
More information about the CRIU
mailing list