[Xenomai] Switching to secondary mode despite of use of mmap
gilles.chanteperdrix at xenomai.org
Tue Dec 15 18:09:18 CET 2015
On Tue, Dec 15, 2015 at 04:03:58PM +0000, Umair Ali wrote:
> Thanks Gilles for the reply.
> > The slackspot trace you show only contains calls to timerfd_create
> and socket. Yes, timerfd_create and socket cause a switch to
> secondary mode.
> The slackspot output file shows that socket and timerfd_create is
> called again and again. But i have used these two once and then in
> the "while loop" timer is read and packet is send.
>From the look of the trace, the calls to timerfd_create and socket
belong to different processes. So, I would say that the multiple
instances correspond to multiple instances of your program. Have you
not launched the program multiple times?
If that is the case, and you only get in fact two modes switches due
to timerfd_create() and socket(), are you sure you still have a
problem? Are you sure your problem is not simply the jitter?
> Does it mean
> that timerfd_create and socket is calling every time once the one
> loop finish and start other loop until while loop condition is
I am sorry, I do not really understand this question, but I believe
the above explanation should be sufficient.
> Is there any way i can avoid the transition to
> secondary mode without using timerfd_create and socket.
There should be no problem using timerfd_create and socket.
> Can i use
> cobalt kernel timers service direclty in user space. Please guide
> me thanks.
No, kernel space timers are used in kernel space, that is why they
are called "kernel-space timers". But a timerfd is a user-space
interface to a kernel-space timer. I believe I already gave you link
on how to use kernel-space timers if you wish to do so.
More information about the Xenomai