Introducing the Big Tinc Lock.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 14 Jan 2011 21:18:59 +0000 (22:18 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 14 Jan 2011 21:18:59 +0000 (22:18 +0100)
Now that tinc is multi-threaded, we need some form of synchronisation.  For
now, there is a single mutex which we lock whenever we do something with global
data structures. The main thread, from which timer events are handled, is
always locked unless it is sleeping for the next event, the other threads
receive incoming I/O unlocked, and lock to process the received data.

In the future more fine-grained locking should be used, probably in the form of
rwlocks, or lockless algorithms (maybe RCU).


No differences found