All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miloslav Trmac <mitr@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com, pmoore@hp.com
Subject: Re: [PATCH] Audit: EINTR instead of kernel private return codes in audit records
Date: Wed, 14 Nov 2007 22:13:39 +0100	[thread overview]
Message-ID: <473B6503.3090804@redhat.com> (raw)
In-Reply-To: <200711141530.56256.sgrubb@redhat.com>

Steve Grubb napsal(a):
> On Wednesday 14 November 2007 15:22:08 Eric Paris wrote:
>> +       if (unlikely((return_code == -ERESTART_RESTARTBLOCK) ||
>> +                    (return_code == -ERESTARTNOHAND) ||
>> +                    (return_code == -ERESTARTSYS) ||
>> +                    (return_code == -ERESTARTNOINTR)))
> 
> Would it be more efficient to say:
> 
> if (unlikely(return_code <= -ERESTARTSYS && 
>                return_code >= -ERESTART_RESTARTBLOCK))
> 
> That gets it down to 2 compares and 1 logical op.
gcc performs this transformation automatically.
	Mirek

      parent reply	other threads:[~2007-11-14 21:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14 20:22 [PATCH] Audit: EINTR instead of kernel private return codes in audit records Eric Paris
2007-11-14 20:29 ` Paul Moore
2007-11-14 20:30 ` Steve Grubb
2007-11-14 21:07   ` Eric Paris
2007-11-14 21:17     ` Steve Grubb
2007-11-18  1:58       ` Eric Paris
2007-11-18 10:58         ` Steve Grubb
2007-11-18 16:52           ` Eric Paris
2007-11-14 21:13   ` Miloslav Trmac [this message]

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=473B6503.3090804@redhat.com \
    --to=mitr@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=pmoore@hp.com \
    --cc=sgrubb@redhat.com \
    /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.