* [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
@ 2008-02-01 9:08 axel axel
2008-02-01 9:18 ` Gilles Chanteperdrix
2008-02-01 9:20 ` Gilles Chanteperdrix
0 siblings, 2 replies; 10+ messages in thread
From: axel axel @ 2008-02-01 9:08 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
Hi,
i try to use rt_task_sleep( 10000000 ) in a user-space task under
round-robin scheduling but doesnt' work.
It returns the value -11.
Any idea ?
Thanks a lot
Roberto Bielli
[-- Attachment #2: Type: text/html, Size: 220 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 9:08 [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling axel axel
@ 2008-02-01 9:18 ` Gilles Chanteperdrix
2008-02-01 9:20 ` Gilles Chanteperdrix
1 sibling, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-01 9:18 UTC (permalink / raw)
To: axel axel; +Cc: xenomai
On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
> Hi,
>
> i try to use rt_task_sleep( 10000000 ) in a user-space task under
> round-robin scheduling but doesnt' work.
>
> It returns the value -11.
>
> Any idea ?
Do you observe the same behaviour with xenomai trunk ?
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 9:08 [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling axel axel
2008-02-01 9:18 ` Gilles Chanteperdrix
@ 2008-02-01 9:20 ` Gilles Chanteperdrix
2008-02-01 9:42 ` axel axel
1 sibling, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-01 9:20 UTC (permalink / raw)
To: axel axel; +Cc: xenomai
On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
> Hi,
>
> i try to use rt_task_sleep( 10000000 ) in a user-space task under
> round-robin scheduling but doesnt' work.
Do not forget that the number passed to rt_task_sleep is a count of
ticks (and documented as such), so, if you want to sleep for 10ms, you
should call:
rt_task_sleep(rt_timer_ns2ticks(10000000))
>
> It returns the value -11.
>
> Any idea ?
>
> Thanks a lot
>
> Roberto Bielli
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
>
>
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 9:20 ` Gilles Chanteperdrix
@ 2008-02-01 9:42 ` axel axel
2008-02-01 9:53 ` Gilles Chanteperdrix
0 siblings, 1 reply; 10+ messages in thread
From: axel axel @ 2008-02-01 9:42 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]
2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>
> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
> > Hi,
> >
> > i try to use rt_task_sleep( 10000000 ) in a user-space task under
> > round-robin scheduling but doesnt' work.
>
Do not forget that the number passed to rt_task_sleep is a count of
> ticks (and documented as such), so, if you want to sleep for 10ms, you
> should call:
> rt_task_sleep(rt_timer_ns2ticks(10000000))
i try also this but nothing is changed.
this is the code of task:
void taskMav1 (void *cookie)
{
int err, i;
float a, b, c;
//const float res2 = 14.6;
//const float res3 = 22.5;
//
if( rt_task_set_mode( T_LOCK, T_RRB,0 ) != 0 )
{
printf( "Error rt_task_set_mode on task2samePrio\n" );
fflush( stdout );
return;
}
if( rt_task_slice( NULL, 1 ) != 0 )
{
printf( "Error rt_task_slice on task1samePrio\n" );
fflush( stdout );
return;
}
rt_sem_p( &rtSemStartAll, TM_INFINITE );
rt_sem_v( &rtSemStartAll );
for (;;) {
// for( i = 0; i < 100; i++ )
// {
// a = 2.1;
// b = a * 2.0;
// c = b + 3.1;
//
// if ( res1local != c )
// {
// /* Process interrupt. */
// // P9 on
// *mapp_dout = *mapp_dout | 0x00000004;
//
// // P9 off
// *mapp_dout = *mapp_dout & 0xFFFFFFFB;
// rt_task_sleep( 100000000 );
// continue;
// }
//
// }
//rt_task_sleep( 100000000 );
*mapp_dout = *mapp_dout | 0x00000004;
err = rt_task_sleep( rt_timer_ns2ticks(10000000) );
if( err != 0 )
{
printf( "Error rt_task_sleep on taskMav1 %d\n", err );
fflush( stdout );
return;
}
*mapp_dout = *mapp_dout & 0xFFFFFFFB;
}
}
and this is the code of caller:
void testMaverickCrunch( void )
{
int err;
err = rt_sem_create( &rtSemStartAll, "rtSemStartAll", 0, S_FIFO );
if( err != 0 )
{
printf( "Error on rt_sem_create rtSemStartAll \n" );
fflush( stdout );
return;
}
err = rt_timer_set_mode( 5000000 );
if( err != 0 )
{
printf( "Error on rt_timer_set_mode \n" );
fflush( stdout );
return;
}
err = rt_task_spawn( &rtTaskMav1, "rtTaskMav1", 0, 1, 0, taskMav1,NULL
);
if( err != 0 )
{
printf( "Error on rtTaskMav1\n" );
fflush( stdout );
rt_task_delete(&rtTaskMav1);
return;
}
rt_sem_v( &rtSemStartAll );
}
>
> > It returns the value -11.
> >
> > Any idea ?
> >
> > Thanks a lot
> >
> > Roberto Bielli
> >
> > _______________________________________________
> > Xenomai-core mailing list
> > Xenomai-core@domain.hid
> > https://mail.gna.org/listinfo/xenomai-core
> >
> >
>
>
>
> --
> Gilles Chanteperdrix
>
[-- Attachment #2: Type: text/html, Size: 6778 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 9:42 ` axel axel
@ 2008-02-01 9:53 ` Gilles Chanteperdrix
2008-02-01 10:02 ` Soft Axel
0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-01 9:53 UTC (permalink / raw)
To: axel axel; +Cc: xenomai
On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>
>
> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
> > On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
> > > Hi,
> > >
> > > i try to use rt_task_sleep( 10000000 ) in a user-space task under
> > > round-robin scheduling but doesnt' work.
> >
> > Do not forget that the number passed to rt_task_sleep is a count of
> > ticks (and documented as such), so, if you want to sleep for 10ms, you
> > should call:
> > rt_task_sleep(rt_timer_ns2ticks(10000000))
>
> i try also this but nothing is changed.
Of course, but about the other question: do you observe the same
behaviour with xenomai trunk ?
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 10:02 ` Soft Axel
@ 2008-02-01 10:00 ` Gilles Chanteperdrix
2008-02-04 11:50 ` Soft Axel
2008-02-04 11:53 ` Soft Axel
0 siblings, 2 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-01 10:00 UTC (permalink / raw)
To: Soft Axel; +Cc: xenomai
On Fri, Feb 1, 2008 at 11:02 AM, Soft Axel <softaxel@domain.hid> wrote:
>
> Gilles Chanteperdrix ha scritto:
>
> On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>
>
> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>
>
> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
>
>
> Hi,
>
> i try to use rt_task_sleep( 10000000 ) in a user-space task under
> round-robin scheduling but doesnt' work.
>
> Do not forget that the number passed to rt_task_sleep is a count of
> ticks (and documented as such), so, if you want to sleep for 10ms, you
> should call:
> rt_task_sleep(rt_timer_ns2ticks(10000000))
>
> i try also this but nothing is changed.
>
> Of course, but about the other question: do you observe the same
> behaviour with xenomai trunk ?
>
>
> What do you mean xenomai trunk ?
>
> this is my actual configuration:
> - xenomai-2.4-rc5
> - kernel 2.6.20.4 arm cirrus ep9315 patched
>
> have i try with xenomai 2.4.1 ?
No, please try Xenomai trunk:
https://gna.org/svn/?group=xenomai
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 9:53 ` Gilles Chanteperdrix
@ 2008-02-01 10:02 ` Soft Axel
2008-02-01 10:00 ` Gilles Chanteperdrix
0 siblings, 1 reply; 10+ messages in thread
From: Soft Axel @ 2008-02-01 10:02 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 993 bytes --]
Gilles Chanteperdrix ha scritto:
> On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>
>> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>>
>>> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
>>>
>>>> Hi,
>>>>
>>>> i try to use rt_task_sleep( 10000000 ) in a user-space task under
>>>> round-robin scheduling but doesnt' work.
>>>>
>>> Do not forget that the number passed to rt_task_sleep is a count of
>>> ticks (and documented as such), so, if you want to sleep for 10ms, you
>>> should call:
>>> rt_task_sleep(rt_timer_ns2ticks(10000000))
>>>
>> i try also this but nothing is changed.
>>
>
> Of course, but about the other question: do you observe the same
> behaviour with xenomai trunk ?
>
>
What do you mean xenomai trunk ?
this is my actual configuration:
- xenomai-2.4-rc5
- kernel 2.6.20.4 arm cirrus ep9315 patched
have i try with xenomai 2.4.1 ?
thanks
Roberto Bielli
[-- Attachment #2: Type: text/html, Size: 1878 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 10:00 ` Gilles Chanteperdrix
@ 2008-02-04 11:50 ` Soft Axel
2008-02-04 13:11 ` Gilles Chanteperdrix
2008-02-04 11:53 ` Soft Axel
1 sibling, 1 reply; 10+ messages in thread
From: Soft Axel @ 2008-02-04 11:50 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
Gilles Chanteperdrix ha scritto:
> On Fri, Feb 1, 2008 at 11:02 AM, Soft Axel <softaxel@domain.hid> wrote:
>
>> Gilles Chanteperdrix ha scritto:
>>
>> On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>>
>>
>> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>>
>>
>> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
>>
>>
>> Hi,
>>
>> i try to use rt_task_sleep( 10000000 ) in a user-space task under
>> round-robin scheduling but doesnt' work.
>>
>> Do not forget that the number passed to rt_task_sleep is a count of
>> ticks (and documented as such), so, if you want to sleep for 10ms, you
>> should call:
>> rt_task_sleep(rt_timer_ns2ticks(10000000))
>>
>> i try also this but nothing is changed.
>>
>> Of course, but about the other question: do you observe the same
>> behaviour with xenomai trunk ?
>>
>>
>> What do you mean xenomai trunk ?
>>
>> this is my actual configuration:
>> - xenomai-2.4-rc5
>> - kernel 2.6.20.4 arm cirrus ep9315 patched
>>
>> have i try with xenomai 2.4.1 ?
>>
>
> No, please try Xenomai trunk:
> https://gna.org/svn/?group=xenomai
>
>
I try with the xenomai trunk and this is OK.
But i have one question: the xenomai trunk is stable or every change is
uploaded ?
Because i can't upgrade my board very frequently and i want to put a
stable version.
thanks a lot
Roberto
[-- Attachment #2: Type: text/html, Size: 2168 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-01 10:00 ` Gilles Chanteperdrix
2008-02-04 11:50 ` Soft Axel
@ 2008-02-04 11:53 ` Soft Axel
1 sibling, 0 replies; 10+ messages in thread
From: Soft Axel @ 2008-02-04 11:53 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Gilles Chanteperdrix ha scritto:
> On Fri, Feb 1, 2008 at 11:02 AM, Soft Axel <softaxel@domain.hid> wrote:
>
>> Gilles Chanteperdrix ha scritto:
>>
>> On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>>
>>
>> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>>
>>
>> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
>>
>>
>> Hi,
>>
>> i try to use rt_task_sleep( 10000000 ) in a user-space task under
>> round-robin scheduling but doesnt' work.
>>
>> Do not forget that the number passed to rt_task_sleep is a count of
>> ticks (and documented as such), so, if you want to sleep for 10ms, you
>> should call:
>> rt_task_sleep(rt_timer_ns2ticks(10000000))
>>
>> i try also this but nothing is changed.
>>
>> Of course, but about the other question: do you observe the same
>> behaviour with xenomai trunk ?
>>
>>
>> What do you mean xenomai trunk ?
>>
>> this is my actual configuration:
>> - xenomai-2.4-rc5
>> - kernel 2.6.20.4 arm cirrus ep9315 patched
>>
>> have i try with xenomai 2.4.1 ?
>>
>
> No, please try Xenomai trunk:
> https://gna.org/svn/?group=xenomai
>
>
Yes, it works.
But i have one question.
The main trunk is stable or every change is uploaded ?
For me it's very important because i can't upgrade the board very
frequently.
Roberto
[-- Attachment #2: Type: text/html, Size: 2130 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling
2008-02-04 11:50 ` Soft Axel
@ 2008-02-04 13:11 ` Gilles Chanteperdrix
0 siblings, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2008-02-04 13:11 UTC (permalink / raw)
To: Soft Axel; +Cc: xenomai
On Mon, Feb 4, 2008 at 12:50 PM, Soft Axel <softaxel@domain.hid> wrote:
>
> Gilles Chanteperdrix ha scritto:
> On Fri, Feb 1, 2008 at 11:02 AM, Soft Axel <softaxel@domain.hid> wrote:
>
>
> Gilles Chanteperdrix ha scritto:
>
> On Fri, Feb 1, 2008 at 10:42 AM, axel axel <softaxel@domain.hid> wrote:
>
>
> 2008/2/1, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>:
>
>
> On Fri, Feb 1, 2008 at 10:08 AM, axel axel <softaxel@domain.hid> wrote:
>
>
> Hi,
>
> i try to use rt_task_sleep( 10000000 ) in a user-space task under
> round-robin scheduling but doesnt' work.
>
> Do not forget that the number passed to rt_task_sleep is a count of
> ticks (and documented as such), so, if you want to sleep for 10ms, you
> should call:
> rt_task_sleep(rt_timer_ns2ticks(10000000))
>
> i try also this but nothing is changed.
>
> Of course, but about the other question: do you observe the same
> behaviour with xenomai trunk ?
>
>
> What do you mean xenomai trunk ?
>
> this is my actual configuration:
> - xenomai-2.4-rc5
> - kernel 2.6.20.4 arm cirrus ep9315 patched
>
> have i try with xenomai 2.4.1 ?
>
>
>
> No, please try Xenomai trunk:
> https://gna.org/svn/?group=xenomai
>
>
> I try with the xenomai trunk and this is OK.
>
> But i have one question: the xenomai trunk is stable or every change is
> uploaded ?
> Because i can't upgrade my board very frequently and i want to put a stable
> version.
There was a commit in trunk which looked like it could solve your
issue. But the same commit appears in the v2.4.x branch, and so will
be in the next v2.4.x release.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-02-04 13:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 9:08 [Xenomai-core] rt_task_sleep doesn't work with round robin scheduling axel axel
2008-02-01 9:18 ` Gilles Chanteperdrix
2008-02-01 9:20 ` Gilles Chanteperdrix
2008-02-01 9:42 ` axel axel
2008-02-01 9:53 ` Gilles Chanteperdrix
2008-02-01 10:02 ` Soft Axel
2008-02-01 10:00 ` Gilles Chanteperdrix
2008-02-04 11:50 ` Soft Axel
2008-02-04 13:11 ` Gilles Chanteperdrix
2008-02-04 11:53 ` Soft Axel
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.