From: Guus Sliepen Date: Tue, 15 Sep 2009 20:59:01 +0000 (+0200) Subject: Use a mutex to allow the TAP reader to process packets faster on Windows. X-Git-Tag: release-1.0.10~24 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=b47c17bcdeb70b63ad9346dc97ba575597cbd803;hp=b47c17bcdeb70b63ad9346dc97ba575597cbd803 Use a mutex to allow the TAP reader to process packets faster on Windows. The TAP-Win32 device is not a socket, and select() under Windows only works with sockets. Tinc used a separate thread to read from the TAP-Win32 device, and passed this via a local socket to the main thread which could then select() from it. We now use a global mutex, which is only unlocked when the main thread is waiting for select(), to allow the TAP reader thread to process packets directly. ---