networking driver implementation question
Till Straumann
strauman at SLAC.Stanford.EDU
Wed Oct 17 00:25:03 UTC 2001
Hi.
I am porting Donald Beckers linux driver for the yellowfin/Symbios
53C885
to RTEMS.
When I look at the ethernet drivers in 'libchip' I can see that a common
scheme is to create driver tasks. The TX task doing something like
for (;;) {
wait_on_event();
IF_DEQUEUE(&ifp->if_snd, m);
sendpacket(m);
}
Note that this loop is running in the context of the network _driver's_
task.
A close look at IF_DEQUEUE() [which normally is only used in the context
of the BSD networking task] reveals that the queue data structure is not
protected by any kind of mutex.
Can somebody explain how the queue is protected from being corrupted
(other than by good karma)??
-- Regards, Till.
More information about the users
mailing list