All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Fix historic msleep wrapping
       [not found] <E1O1e8n-0007uc-At@domain.hid>
@ 2010-04-14  8:41 ` Gilles Chanteperdrix
  2010-04-14  8:47   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2010-04-14  8:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

GIT version control wrote:
> Module: xenomai-jki
> Branch: queues/proc
> Commit: f14c48e888b7f811f4c040b3b7ff0783fe115978
> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=f14c48e888b7f811f4c040b3b7ff0783fe115978
> 
> Author: Jan Kiszka <jan.kiszka@domain.hid>
> Date:   Mon Apr  5 17:25:29 2010 +0200
> 
> Fix historic msleep wrapping
> 
> Probably only an academic exercise: Fix the rounding bug in msleep
> wrapper for kernels < 2.4.28.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
> 
> ---
> 
>  include/asm-generic/wrappers.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
> index 15d9837..64ec43f 100644
> --- a/include/asm-generic/wrappers.h
> +++ b/include/asm-generic/wrappers.h
> @@ -197,7 +197,7 @@ do {									\
>  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
>  #define msleep(x) do {				 \
>  	set_current_state(TASK_UNINTERRUPTIBLE); \
> -	schedule_timeout((x)*(HZ/1000));         \
> +	schedule_timeout(((x)*HZ)/1000);         \
>  } while(0)
>  #endif

Mmm... changing that code again? What about replacing it with the close
patch we discussed?

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Fix historic msleep wrapping
  2010-04-14  8:41 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : Fix historic msleep wrapping Gilles Chanteperdrix
@ 2010-04-14  8:47   ` Jan Kiszka
  2010-04-14  8:49     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2010-04-14  8:47 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

Gilles Chanteperdrix wrote:
> GIT version control wrote:
>> Module: xenomai-jki
>> Branch: queues/proc
>> Commit: f14c48e888b7f811f4c040b3b7ff0783fe115978
>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=f14c48e888b7f811f4c040b3b7ff0783fe115978
>>
>> Author: Jan Kiszka <jan.kiszka@domain.hid>
>> Date:   Mon Apr  5 17:25:29 2010 +0200
>>
>> Fix historic msleep wrapping
>>
>> Probably only an academic exercise: Fix the rounding bug in msleep
>> wrapper for kernels < 2.4.28.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>>
>> ---
>>
>>  include/asm-generic/wrappers.h |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
>> index 15d9837..64ec43f 100644
>> --- a/include/asm-generic/wrappers.h
>> +++ b/include/asm-generic/wrappers.h
>> @@ -197,7 +197,7 @@ do {									\
>>  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
>>  #define msleep(x) do {				 \
>>  	set_current_state(TASK_UNINTERRUPTIBLE); \
>> -	schedule_timeout((x)*(HZ/1000));         \
>> +	schedule_timeout(((x)*HZ)/1000);         \
>>  } while(0)
>>  #endif
> 
> Mmm... changing that code again? What about replacing it with the close
> patch we discussed?

The close patch (actually a rewrite of it) will only avoid polling on
the context reference count. Other polling is part of the RTDM API and
cannot be easily removed.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : Fix historic msleep wrapping
  2010-04-14  8:47   ` Jan Kiszka
@ 2010-04-14  8:49     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2010-04-14  8:49 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> GIT version control wrote:
>>> Module: xenomai-jki
>>> Branch: queues/proc
>>> Commit: f14c48e888b7f811f4c040b3b7ff0783fe115978
>>> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=f14c48e888b7f811f4c040b3b7ff0783fe115978
>>>
>>> Author: Jan Kiszka <jan.kiszka@domain.hid>
>>> Date:   Mon Apr  5 17:25:29 2010 +0200
>>>
>>> Fix historic msleep wrapping
>>>
>>> Probably only an academic exercise: Fix the rounding bug in msleep
>>> wrapper for kernels < 2.4.28.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
>>>
>>> ---
>>>
>>>  include/asm-generic/wrappers.h |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
>>> index 15d9837..64ec43f 100644
>>> --- a/include/asm-generic/wrappers.h
>>> +++ b/include/asm-generic/wrappers.h
>>> @@ -197,7 +197,7 @@ do {									\
>>>  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
>>>  #define msleep(x) do {				 \
>>>  	set_current_state(TASK_UNINTERRUPTIBLE); \
>>> -	schedule_timeout((x)*(HZ/1000));         \
>>> +	schedule_timeout(((x)*HZ)/1000);         \
>>>  } while(0)
>>>  #endif
>> Mmm... changing that code again? What about replacing it with the close
>> patch we discussed?
> 
> The close patch (actually a rewrite of it) will only avoid polling on
> the context reference count. Other polling is part of the RTDM API and
> cannot be easily removed.

Yes sorry. I thought this was the msleep used by the close syscall. I
hated that msleep and that loop, in debugging phases of RTDM drivers,
this also explains why I am so much in favour of the close patch...

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-14  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1O1e8n-0007uc-At@domain.hid>
2010-04-14  8:41 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : Fix historic msleep wrapping Gilles Chanteperdrix
2010-04-14  8:47   ` Jan Kiszka
2010-04-14  8:49     ` Gilles Chanteperdrix

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.