From: George Anzinger <george@mvista.com>
To: Andrew Morton <akpm@osdl.org>
Cc: eric.piel@tremplin-utc.net, minyard@acm.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Incorrect value for SIGRTMAX, MIPS nonsense removed, timer_gettime fix
Date: Tue, 27 Jan 2004 12:32:34 -0800 [thread overview]
Message-ID: <4016CAE2.2070502@mvista.com> (raw)
In-Reply-To: <20040127104648.1e749f5d.akpm@osdl.org>
Andrew Morton wrote:
> George Anzinger <george@mvista.com> wrote:
>
>>The attached patch does the following:
>>
>>Removes C++ comment in favor of C style.
>>
>>Removes the special treatment for MIPS SIGEV values. We only require (and error
>>if this fails) that the SIGEV_THREAD_ID value not share bits with the other
>>SIGEV values. Note that mips has yet to define this value so when they do...
>>
>>Corrects the check for the signal range to be from 1 to SIGRTMAX inclusive.
>>
>>Adds a check to verify that kmem_cache_alloc() actually returned a timer, error
>>if not.
>>
>>Fixes a bug in timer_gettime() where the incorrect value was returned if a
>>signal was pending on the timer OR the timer was a SIGEV_NONE timer.
>
>
>>- if ((event->sigev_notify & ~SIGEV_NONE & MIPS_SIGEV) &&
>>- event->sigev_signo &&
>>- ((unsigned) (event->sigev_signo > SIGRTMAX)))
>>+ if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) &&
>>+ ((unsigned int) (event->sigev_signo - 1) >= SIGRTMAX))
>> return NULL;
>
>
> I was wondering if someone would try this one :( Really, this is just over
> the top. Take pity upon your readers, and do:
I was rather thinking of educating them :) It does produce better code...
>
> if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) &&
> (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX))
>
>
>>@@ -804,7 +826,7 @@
>> * equal to jiffies, so the timer notify function is called directly.
>> * We do not even queue SIGEV_NONE timers!
>> */
>>- if (!(timr->it_sigev_notify & SIGEV_NONE)) {
>>+ if (!((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
>> if (timr->it_timer.expires == jiffies)
>> timer_notify_task(timr);
>> else
>
>
> Are you sure this is correct? If so, using != would be clearer.
Yes, if he said SIGEV_NONE we don't want to deliver a signal. The restatement
is OK with me.
Shall I resubmit?
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
next prev parent reply other threads:[~2004-01-27 20:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-24 21:31 [PATCH] Incorrect value for SIGRTMAX eric.piel
2004-01-24 22:30 ` Andrew Morton
2004-01-24 22:37 ` eric.piel
2004-01-25 9:21 ` George Anzinger
2004-01-25 10:28 ` eric.piel
2004-01-27 9:19 ` [PATCH] Incorrect value for SIGRTMAX, MIPS nonsense removed, timer_gettime fix George Anzinger
2004-01-27 18:46 ` Andrew Morton
2004-01-27 20:32 ` George Anzinger [this message]
2004-01-27 9:31 ` [PATCH] Fine tune the time conversion to eliminate conversion errors George Anzinger
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=4016CAE2.2070502@mvista.com \
--to=george@mvista.com \
--cc=akpm@osdl.org \
--cc=eric.piel@tremplin-utc.net \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox