[PATCH] Audit: EINTR instead of kernel private return codes in audit records

Miloslav Trmac mitr at redhat.com
Wed Nov 14 21:13:39 UTC 2007


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




More information about the Linux-audit mailing list