[Xenomai] EINTR in notifier.c (mercury)

Philippe Gerum rpm at xenomai.org
Mon Apr 7 11:01:02 CEST 2014


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.




More information about the Xenomai mailing list