All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] warnings and tangled threads.
@ 2007-02-27 23:25 roland Tollenaar
  2007-02-28  7:55 ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: roland Tollenaar @ 2007-02-27 23:25 UTC (permalink / raw)
  To: xenomai

Hi,

Ok I have CAN functionality of some form running in my tasks.
Initializing seems to be successful and I have written some kind of
wrapper to create a can_write() function of my own which also seems to
be -kind of-  working. I have one question and one problem.

I keep on getting this compile warning

In file included from /mnt/appusb/xenomai/include/rtdm/rtcan.h:250,
                 from cancom.cpp:15:
/mnt/appusb/xenomai/include/rtdm/rtdm.h: In function `ssize_t
rt_dev_sendto(int, const void*, size_t, int, const sockaddr*,
socklen_t)':
/mnt/appusb/xenomai/include/rtdm/rtdm.h:323: warning: missing
initializer for member `msghdr::msg_flags'

Its in rtdm.h so I have not looked closely at it yet but I presume I
must be doing something wrong to be getting it?


The problem I have is that I test my code by running rtcanrecv on
rtcan0 while my application also sends on rtcan0.

What happens is that one of the two real-time tasks does not start up.
If I am lucky the one (task1) calling can_write() starts up and then
the messages come through to rtcanrecv. Great. But if I am less lucky
then task 2 runs happily and task1  does nothing. Nothing is received
on rtcanrecv.

If rtcanrecv is not running then my application has no problems. I can
see that it is writing by reading out /proc/rtcan/rtcan0/info looking
at TxCount.

I call can_write() directly after rt_task_wait_period so i did not
think it necessary to use rt_task_shadow or such like in it.
Can_write is implemented in a separate .cpp file to the one in which
it is called. Can this cause memory faults? Must I use mlockall in
can_write() or something?


Thanks for the time.


Kind regards,

Roland.


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

end of thread, other threads:[~2007-03-01 20:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-27 23:25 [Xenomai-help] warnings and tangled threads roland Tollenaar
2007-02-28  7:55 ` Jan Kiszka
2007-02-28  8:40   ` Jan Kiszka
2007-02-28 13:53     ` Jan Kiszka
2007-03-01 19:51       ` roland Tollenaar
2007-03-01 20:27         ` Jan Kiszka
2007-03-01 20:27         ` Dmitry Adamushko
2007-02-28 18:00   ` roland Tollenaar
2007-02-28 20:10     ` Wolfgang Grandegger

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.