archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <>
Subject: Re: 2 futex questions
Date: Wed, 25 Sep 2002 10:23:16 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0209251015320.4690-100000@localhost.localdomain> (raw)
In-Reply-To: <>

On Tue, 24 Sep 2002 wrote:

> 1) There's a comment in sys_futex(...) that says pos_in_page must not be
> on a page boundary. Could someone explain why?

what it wants to say: 'the futex word must not overflow into the next
page', ie. the futex word needs to be on a single page.

> 2) How is this ever true:
> 	pos_in_page + sizeof(int) > PAGE_SIZE
> when checking if pos_in_page is valid?

the full test is this:

        pos_in_page = ((unsigned long)uaddr) % PAGE_SIZE;

        if ((pos_in_page % __alignof__(int)) != 0
            || pos_in_page + sizeof(int) > PAGE_SIZE)
                return -EINVAL;

what it says: 'uaddr must be naturally aligned, and the word must be on a
single page'. In theory it's possible that __alignof__(int) !=


  reply	other threads:[~2002-09-25  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-25  0:33 alfred
2002-09-25  8:23 ` Ingo Molnar [this message]
2002-09-25  1:14   ` [patch] " alfred

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0209251015320.4690-100000@localhost.localdomain \ \ \ \
    --subject='Re: 2 futex questions' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).