All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] EINTR in notifier.c (mercury)
Date: Mon, 07 Apr 2014 11:01:02 +0200	[thread overview]
Message-ID: <5342694E.60401@xenomai.org> (raw)
In-Reply-To: <53416E2E.20000@xenomai.org>

On 04/06/2014 05:09 PM, Gilles Chanteperdrix wrote:
> On 04/06/2014 05:04 PM, Philippe Gerum wrote:
>> @@ -1093,7 +1093,9 @@ int threadobj_sleep(struct timespec *ts)
>>   	 */
>>   	current->run_state = __THREAD_S_DELAYED;
>>   	threadobj_save_timeout(&current->core, ts);
>> -	ret = -__RT(clock_nanosleep(CLOCK_COPPERPLATE, TIMER_ABSTIME, ts, NULL));
>> +	do
>> +		ret = -__RT(clock_nanosleep(CLOCK_COPPERPLATE, TIMER_ABSTIME, ts, NULL));
>>
>> We should definitely pass and use the "remain" field in clock_nanosleep(), not to restart a complete wait each time we get interrupted.
>>
>
> The remain field only makes sense without TIMER_ABSTIME. With
> TIMER_ABSTIME, since the wake-up time is absolute, passing it again to
> clock_nanosleep should be fine.
>

Yes, sorry. That's right.

-- 
Philippe.


  reply	other threads:[~2014-04-07  9:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 10:34 [Xenomai] EINTR in notifier.c (mercury) Matthias Schneider
2014-03-31 11:19 ` Philippe Gerum
2014-03-31 11:27 ` Gilles Chanteperdrix
2014-03-31 13:18   ` Philippe Gerum
2014-03-31 17:43     ` Matthias Schneider
2014-03-31 17:50     ` Gilles Chanteperdrix
2014-04-06 11:11       ` Matthias Schneider
2014-04-06 15:04         ` Philippe Gerum
2014-04-06 15:09           ` Gilles Chanteperdrix
2014-04-07  9:01             ` Philippe Gerum [this message]
2014-04-07 16:49           ` Matthias Schneider
2014-04-08  7:22             ` Philippe Gerum
2014-04-11 14:59             ` Philippe Gerum
2014-04-11 15:07               ` Philippe Gerum
2014-04-11 16:44                 ` Matthias Schneider
2014-04-11 17:02                   ` Philippe Gerum

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=5342694E.60401@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.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.