Re: [RTnet-users] r7168 using the rt_r8169.ko driver
Brought to you by:
bet-frogger,
kiszka
From: Hidde V. (E2M) <hve...@e2...> - 2013-10-09 13:02:03
|
On Wed, Oct 9, 2013 at 12:15 PM, Jan Kiszka <jan...@we...> wrote: > On 2013-10-09 11:13, Hidde Verstoep (E2M) wrote: >> A lot of other rt drivers use busy waits for small timeouts. >> However, the timeout here is quite large and a busy wait does not seem >> like the right solution. I wanted to try to use the rtdm timer service >> (http://www.xenomai.org/documentation/trunk/html/api/group__rtdmtimer.html). >> However, these timers are not able to pass context to a handler. So, a >> handler wouldn't know which device to check in case of multiple >> devices. Could you give a suggestion as how to solve it Jan? > > container_of(timer...) - the timer object is usually embedded in a > struct that describes the required context. But you don't need > real-timer timers unless the timeout is on the critical path. That > wasn't the case with RTnet drivers so far. I fixed the issue using rtdm timers (using your suggestion of container_of). The patch is attached. Hidde |