All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] tasklet using Xenomai
@ 2009-11-10  7:41 Anisha Kaul
  2009-11-10  8:07 ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Anisha Kaul @ 2009-11-10  7:41 UTC (permalink / raw)
  To: xenomai

Dear all,

How to define a tasklet using Xenomai for a serial port interrupt handler? 
Does 'rtdm_event_init()' function work as a tasklet in Xenomai ?

Thanking you in anticipation,
Anisha Kaul

-------------------------------------
Hi-Tech Gears Limited, Gurgaon, India






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

* Re: [Xenomai-core] tasklet using Xenomai
  2009-11-10  7:41 [Xenomai-core] tasklet using Xenomai Anisha Kaul
@ 2009-11-10  8:07 ` Jan Kiszka
       [not found]   ` <200911101343.09183.anisha.kaul@domain.hid>
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2009-11-10  8:07 UTC (permalink / raw)
  To: Anisha Kaul; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

Anisha Kaul wrote:
> Dear all,
> 
> How to define a tasklet using Xenomai for a serial port interrupt handler? 
> Does 'rtdm_event_init()' function work as a tasklet in Xenomai ?

An RTDM event is a binary semaphore for use inside a kernel driver -
probably not what you are looking for. What should be the semantic of
this tasklet, that of old RTAI? And what is the use case behind it?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Xenomai-help] tasklet using Xenomai
       [not found]   ` <200911101343.09183.anisha.kaul@domain.hid>
@ 2009-11-10  8:36     ` Jan Kiszka
  2009-11-10  9:24       ` [Xenomai-core] " Anisha Kaul
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2009-11-10  8:36 UTC (permalink / raw)
  To: Anisha Kaul; +Cc: xenomai-help

[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]

[ Please don't drop CCs! ]

Anisha Kaul wrote:
>> Anisha Kaul wrote:
>>> Dear all,
>>>
>>> How to define a tasklet using Xenomai for a serial port interrupt
>>> handler? Does 'rtdm_event_init()' function work as a tasklet in Xenomai ?
>> An RTDM event is a binary semaphore for use inside a kernel driver -
>> probably not what you are looking for. What should be the semantic of
>> this tasklet, that of old RTAI? And what is the use case behind it?
>>
>> Jan
> 
> Thanks for the prompt reply ! 
> 
> The tasklet I am talking about is supposed to re-set the registers of the 
> serial port each time an interrupt occurs ! We can do this the following way 
> in using Linux system calls :
> 
> void resetRegisters (unsigned long currentlyUnused);
> 
> DECLARE_TASKLET  (rs232Tasklet, resetRegisters, 0);
> 
> void resetRegisters (unsigned long currentlyUnused)
> {
>         outb (0x83, PORT + 3);
>         outb (0x01, PORT + 0);
>         outb (0x00, PORT + 1);
>         outb (0x03, PORT + 3);
>         outb (0x01, PORT + 1);
>         outb (0x63, PORT + 2);
>         outb (0x08, PORT + 4);
> }

This looks like a weird use of tasklets under mainline. Moreover, they
are practically deprecated there.

> 
> How am I supposed to do this using Xenomai ?
> 

Have you considered simply using the rt_16550A driver for your purpose?
You didn't told us your use case from an application POV, so it's hard
to say if the driver meets your requirements. But it does not require
you fiddling with hardware directly.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Xenomai-core] tasklet using Xenomai
  2009-11-10  8:36     ` [Xenomai-help] " Jan Kiszka
@ 2009-11-10  9:24       ` Anisha Kaul
  2009-11-10 12:12         ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Anisha Kaul @ 2009-11-10  9:24 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

> > Thanks for the prompt reply !
> >
> > The tasklet I am talking about is supposed to re-set the registers of the
> > serial port each time an interrupt occurs ! We can do this the following
> > way in using Linux system calls :
> >
> > void resetRegisters (unsigned long currentlyUnused);
> >
> > DECLARE_TASKLET  (rs232Tasklet, resetRegisters, 0);
> >
> > void resetRegisters (unsigned long currentlyUnused)
> > {
> >         outb (0x83, PORT + 3);
> >         outb (0x01, PORT + 0);
> >         outb (0x00, PORT + 1);
> >         outb (0x03, PORT + 3);
> >         outb (0x01, PORT + 1);
> >         outb (0x63, PORT + 2);
> >         outb (0x08, PORT + 4);
> > }
>
> This looks like a weird use of tasklets under mainline. Moreover, they
> are practically deprecated there.
>
> > How am I supposed to do this using Xenomai ?
>
> Have you considered simply using the rt_16550A driver for your purpose?
> You didn't told us your use case from an application POV, so it's hard
> to say if the driver meets your requirements. But it does not require
> you fiddling with hardware directly.
>
> Jan


" This looks like a weird use of tasklets under mainline. Moreover, they are 
practically deprecated there."

Why do you say this ?

" Have you considered simply using the rt_16550A driver for your purpose? "

I was not aware that a serial port driver for real time does exist ! 
Secondly, here we are writing a robotic application where we want to stop the 
robot if we receive data 'x' or move the robot if we receive data 'y'. 
Can you tell me how can we achieve this functionality with rt_16550A driver.
Is rt_16550A driver fully stable ?

thanks,
anisha

-------------------------------------
Hi-Tech Gears Limited, Gurgaon, India






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

* Re: [Xenomai-core] tasklet using Xenomai
  2009-11-10  9:24       ` [Xenomai-core] " Anisha Kaul
@ 2009-11-10 12:12         ` Jan Kiszka
  2009-11-10 12:50           ` [Xenomai-core] switches between hard real time and soft real time Anisha Kaul
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2009-11-10 12:12 UTC (permalink / raw)
  To: Anisha Kaul; +Cc: xenomai

Anisha Kaul wrote:
>>> Thanks for the prompt reply !
>>>
>>> The tasklet I am talking about is supposed to re-set the registers of the
>>> serial port each time an interrupt occurs ! We can do this the following
>>> way in using Linux system calls :
>>>
>>> void resetRegisters (unsigned long currentlyUnused);
>>>
>>> DECLARE_TASKLET  (rs232Tasklet, resetRegisters, 0);
>>>
>>> void resetRegisters (unsigned long currentlyUnused)
>>> {
>>>         outb (0x83, PORT + 3);
>>>         outb (0x01, PORT + 0);
>>>         outb (0x00, PORT + 1);
>>>         outb (0x03, PORT + 3);
>>>         outb (0x01, PORT + 1);
>>>         outb (0x63, PORT + 2);
>>>         outb (0x08, PORT + 4);
>>> }
>> This looks like a weird use of tasklets under mainline. Moreover, they
>> are practically deprecated there.
>>
>>> How am I supposed to do this using Xenomai ?
>> Have you considered simply using the rt_16550A driver for your purpose?
>> You didn't told us your use case from an application POV, so it's hard
>> to say if the driver meets your requirements. But it does not require
>> you fiddling with hardware directly.
>>
>> Jan
> 
> 
> " This looks like a weird use of tasklets under mainline. Moreover, they are 
> practically deprecated there."
> 
> Why do you say this ?

The function you defer from interrupt context into a tasklet is
comparably cheap, specifically on modern systems. So the management
overhead is expect to be in the same dimension as the workload (you do
not gain noticeably shorter IRQ-off times this way).

> 
> " Have you considered simply using the rt_16550A driver for your purpose? "
> 
> I was not aware that a serial port driver for real time does exist ! 
> Secondly, here we are writing a robotic application where we want to stop the 
> robot if we receive data 'x' or move the robot if we receive data 'y'. 
> Can you tell me how can we achieve this functionality with rt_16550A driver.

Check existing examples and the RTDM serial profile documentation.

> Is rt_16550A driver fully stable ?

Yes, it's used, among other things, in robotics for many years.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


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

* [Xenomai-core] switches between hard real time and soft real time
  2009-11-10 12:12         ` Jan Kiszka
@ 2009-11-10 12:50           ` Anisha Kaul
  2009-11-10 13:13             ` Gilles Chanteperdrix
  2009-11-10 13:33             ` [Xenomai-help] " Philippe Gerum
  0 siblings, 2 replies; 8+ messages in thread
From: Anisha Kaul @ 2009-11-10 12:50 UTC (permalink / raw)
  To: xenomai

hi,

Is there any command or technique to know when your kernel module is running 
on hard-real time and when it switches to soft-real time (because of any 
linux system call) ?

thanks,
anisha

-------------------------------------
Hi-Tech Gears Limited, Gurgaon, India






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

* Re: [Xenomai-core] switches between hard real time and soft real time
  2009-11-10 12:50           ` [Xenomai-core] switches between hard real time and soft real time Anisha Kaul
@ 2009-11-10 13:13             ` Gilles Chanteperdrix
  2009-11-10 13:33             ` [Xenomai-help] " Philippe Gerum
  1 sibling, 0 replies; 8+ messages in thread
From: Gilles Chanteperdrix @ 2009-11-10 13:13 UTC (permalink / raw)
  To: Anisha Kaul; +Cc: xenomai

Anisha Kaul wrote:
> hi,

Hi,

Please do not reply to an unrelated mail when asking a new question.
Mail clients which do proper threading, such as the mailing list
archives will show it in the same thread as the mail you reply to.

> 
> Is there any command or technique to know when your kernel module is running 
> on hard-real time and when it switches to soft-real time (because of any 
> linux system call) ?

Please read:
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Life-with-Adeos-rev-B.pdf
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Native-API-Tour-rev-C.pdf

-- 
                                          Gilles



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

* Re: [Xenomai-help] [Xenomai-core] switches between hard real time and soft real time
  2009-11-10 12:50           ` [Xenomai-core] switches between hard real time and soft real time Anisha Kaul
  2009-11-10 13:13             ` Gilles Chanteperdrix
@ 2009-11-10 13:33             ` Philippe Gerum
  1 sibling, 0 replies; 8+ messages in thread
From: Philippe Gerum @ 2009-11-10 13:33 UTC (permalink / raw)
  To: Anisha Kaul; +Cc: xenomai

On Tue, 2009-11-10 at 18:20 +0530, Anisha Kaul wrote:
> hi,
> 
> Is there any command or technique to know when your kernel module is running 
> on hard-real time and when it switches to soft-real time (because of any 
> linux system call) ?

Off-topic on this list. Please switch to xenomai-help.

> 
> thanks,
> anisha
> 
> -------------------------------------
> Hi-Tech Gears Limited, Gurgaon, India
> 
> 
> 
> 
> 
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core


-- 
Philippe.




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

end of thread, other threads:[~2009-11-10 13:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10  7:41 [Xenomai-core] tasklet using Xenomai Anisha Kaul
2009-11-10  8:07 ` Jan Kiszka
     [not found]   ` <200911101343.09183.anisha.kaul@domain.hid>
2009-11-10  8:36     ` [Xenomai-help] " Jan Kiszka
2009-11-10  9:24       ` [Xenomai-core] " Anisha Kaul
2009-11-10 12:12         ` Jan Kiszka
2009-11-10 12:50           ` [Xenomai-core] switches between hard real time and soft real time Anisha Kaul
2009-11-10 13:13             ` Gilles Chanteperdrix
2009-11-10 13:33             ` [Xenomai-help] " Philippe Gerum

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.