[Click] Threading and locks

kevin_mitchell at agilent.com kevin_mitchell at agilent.com
Mon Sep 6 04:45:37 EDT 2004


I have a simple question about threading.  I've written some Click elements that are used in a script that is processing packets from two interfaces, and the elements also use timers.  Multiple elements manipulate a shared data structure.  All this is running in kernel mode.  Is Click single-threaded, even in an SMP environment, so I don't need to worry about adding locks etc when accessing the shared structures.  Or are multiple threads potentially in use, and so I should assume the code in multiple elements could be running simultaneously, and therefore I need to use locking?  I noticed the docs talk about tasks potentially running on multiple threads, but I wasn't sure what the implications were for packet-processing and timers. 

Kevin



More information about the click mailing list