mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-06 18:29:50 +09:00
threads: Add Windows threads implementation
Added Windows threads implementation based on CriticalSection. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
83b43443e5
commit
04cc7b769a
@@ -35,6 +35,13 @@
|
||||
#define SSH_MUTEX_STATIC_INIT PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
|
||||
#elif (defined _WIN32) || (defined _WIN64)
|
||||
|
||||
#include <windows.h>
|
||||
#include <winbase.h>
|
||||
#define SSH_MUTEX CRITICAL_SECTION *
|
||||
#define SSH_MUTEX_STATIC_INIT NULL
|
||||
|
||||
#else
|
||||
|
||||
# define SSH_MUTEX void *
|
||||
|
||||
Reference in New Issue
Block a user