Can a thread use message communication as well as one-shot timers?
aref.taidi at newera-computing.com
Fri Oct 12 17:44:58 CEST 2007
I have solved my problem by using a different approach. The way I was
trying to do this was unnecessarily complicated.
Instead of using a timer from inside the first thread, I have created a
second periodic thread that does the job. The oneshot thread now
monitors the incoming messages as intended and the periodic one does its
work. These two would manage the same state machine and use
semaphore-protected resources. Everything works fine now.
From: Paolo Mantegazza [mailto:mantegazza at aero.polimi.it]
Sent: 12 October 2007 08:04
To: Aref Taidi
Cc: rtai at rtai.org
Subject: Re: Can a thread use message communication as well as one-shot
Aref Taidi wrote:
> Hello everyone,
> I have a hard realtime user space thread that uses rt_receivex() to
> receive messages from other threads. I would also like to start a
> oneshot timer from this thread to check things out every second, so
> in between the thread can receive messages.
> Following some examples in the showroom I make the following calls
> appropriate parameters (omitted below) in this order:
> rt_task_use_fpu(netman_task, 1);
> But the above causes the PC to hang needing a reboot. But if I don't
> the last 3 function calls everything works, but I won't have a timer!!
> Please can someone tell me what I am doing wrong?
Difficult to say. The flow is important but the call params might be
relevant too. Since it seems you are testing something simple senda
small test showing your troubles, as usual.
> Many thanks in advance,
> RTAI mailing list
> RTAI at rtai.org
This email has been verified as Virus free
Virus Protection and more available at http://www.plus.net
More information about the Rtai