Skip to contentSkip to conversation

killing a rt task and closing a rtdm fd

Xenomai-core NZG 2 participants 2 messages May 4, 2007 – May 7, 2007

lore
Share & tools
lore

NZG

author
#0 lore raw

I've got a user space app that starts a periodic real time task. The periodic task opens an rtdm file descriptor and starts writing to it in a loop.

At some point, due to user interaction, the task needs to be killed and the file descriptor closed.

What's the easiest way to signal it to do so? Anyone have some example code they can point at?

I looked through the native docs and the examples at
http://www.captain.at/xenomai.php
and
http://svn.gna.org/svn/xenomai/trunk/examples/rtdm/driver-api/

but they don't appear to address this.

The captains example uses a global variable, but this doesn't actually seem to work.

I suspect the task is operating on a copied set of variables, so some sort of message passing is going to be involved, but I don't want to slow down the main task to wait for a message.

thank you,
NZG

#1 lore raw
Quoted 15 lines · NZG

I've got a user space app that starts a periodic real time task. The periodic task opens an rtdm file descriptor and starts writing to it in a loop.

At some point, due to user interaction, the task needs to be killed and the file descriptor closed.

What's the easiest way to signal it to do so? Anyone have some example code they can point at?

I looked through the native docs and the examples at
http://www.captain.at/xenomai.php
and
http://svn.gna.org/svn/xenomai/trunk/examples/rtdm/driver-api/

Quoted 9 lines

but they don't appear to address this.

The captains example uses a global variable, but this doesn't actually seem to work.

I suspect the task is operating on a copied set of variables, so some sort of message passing is going to be involved, but I don't want to slow down the main task to wait for a message.

Check examples under src/utils/can, src/testsuite/switchtest, or irqbench. [And please post help requests on xenomai-help :)]

Jan