[Click] A few questions about locks and availability of linked lists in

Philip Van Hoof spam at pvanhoof.be
Tue Sep 5 17:38:55 EDT 2006


Hi there and thanks for Click,

o. I wonder why the Spinlock class of Click in case of #ifdef __KERNEL__
doesn't (simply) wrap the spinlock_t type, like the SpinlockIRQ one, but
in stead relies on a platform dependant assembler implementation?

o. Can I develop elements that are SMP safe in Click? I'm assuming by
using the spinlocks correctly and using the ELEMENT_MT_SAFE define. Are
there more advanced samples of this? Are there specific things that I
need to care about? Undocumented scary stuff maybe? :)

o. Is there a diagram or some documentation (other than the Click source
code, but I will nevertheless read through it of course) available that
explains how the Packet's go from the kernel/device/etc to my elements?
Can somebody point me to the important pieces of the code (saving me a
few hours of reading code).

o. I also wonder whether or not there's a wrapper for the doubly linked
list functionality found in the list.h kernel header?

Is it a good idea to use one of those ported-to-usermode list.h thingies
you can find on the web, for usermode Click support, and include the
kernel one in case of kernelmode Click support for my custom elements?

We don't want to use the vector(-like) wrappers found in Click for
various reasons like .. "that a doubly linked list is a better solution
for our problem" yadi yada ;)


Thanks ;)

-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be



More information about the click mailing list