All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>, Andrew Morton <akpm@osdl.org>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] pepoll_wait ...
Date: Tue, 17 Jan 2006 20:20:44 -0800	[thread overview]
Message-ID: <43CDC21C.7050608@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0601171933400.15529@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Davide Libenzi wrote:
> The attached patch implements the pepoll_wait system call, that extend
> the event wait mechanism with the same logic ppoll and pselect do. The
> definition of pepoll_wait is: [...]

I definitely ACK this patch, it's needed for the same reasons we need
pselect and ppoll.


> +	if (error == -EINTR) {
> +		if (sigmask) {
> +			memcpy(&current->saved_sigmask, &sigsaved, sizeof(sigsaved));
> +			set_thread_flag(TIF_RESTORE_SIGMASK);
> +		}
> +	} else if (sigmask)
> +		sigprocmask(SIG_SETMASK, &sigsaved, NULL);

This part I'd clean up a bit, though.  Move the if (sigmask) test to the
top and have the EINTR test decide what to do.  As is the code would be
a bit irritating if it wouldn't be so trivial.  The important thing is
that you only do something special if sigmask != NULL.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

  reply	other threads:[~2006-01-18  4:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18  3:36 [PATCH] pepoll_wait Davide Libenzi
2006-01-18  4:20 ` Ulrich Drepper [this message]
2006-01-18  5:03   ` Andrew Morton
2006-01-18  7:13     ` David Woodhouse
2006-01-18  7:40     ` Davide Libenzi
2006-01-18  7:48       ` David Woodhouse
2006-01-18  8:14         ` Davide Libenzi
2006-01-18  7:38   ` Davide Libenzi
2006-01-18 18:38 ` Michael Tokarev
2006-01-18 18:51   ` Davide Libenzi
2006-01-18 19:07   ` Ulrich Drepper

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=43CDC21C.7050608@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=davidel@xmailserver.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.