aboutsummaryrefslogtreecommitdiff
path: root/src/threads
AgeCommit message (Collapse)AuthorFilesLines
2021-03-11[winlocks] Include stdlib.h to avoid crash in WindowsChris Townsend1-0/+1
Due to the missing include, the compiler makes assumptions and leads to a crash in ssh_mutex_lock() during runtime. Signed-off-by: Chris Townsend <christopher.townsend@canonical.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2021-01-11Remove no longer needed compatibility checkDirkjan Bussink1-12/+0
CRYPTO_THREADID_set_callback is available since 1.0.1 which is the oldest supported version. This means the check and compatibility code can be removed. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-11-30libcrypto: Fix access violation in ssh_init()Anderson Toshiyuki Sasaki1-0/+8
This fixes an access violation when ssh_init() was called after ssh_finalize() in Windows when using OpenSSL 1.0.2 and libssh statically linked. Fixes T120 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03threads: Add Windows threads implementationAnderson Toshiyuki Sasaki2-1/+124
Added Windows threads implementation based on CriticalSection. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03threads: Automatically call ssh_init on loadAnderson Toshiyuki Sasaki6-181/+428
This makes unnecessary to call ssh_init() when the library is dynamically loaded. Also removes the threads shared library. The used threads implementation is chosen in configuration time, changing the ssh_threads_get_default() depending on the available threads library. Internally, it is expected a threads implementation providing: - void ssh_mutex_lock(void **mutex); - void ssh_mutex_unlock(void **mutex); - struct ssh_threads_callbacks_struct *ssh_threads_get_default(void); and a crypto implementation providing: - int crypto_thread_init(struct ssh_threads_callbacks_struct *user_callbacks); - void crypto_thread_finalize(void); This adds internal threads implementation for pthreads and noop. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-07cmake: Handle libssh threas library correctlyAndreas Schneider1-2/+7
This should fix the build on Windows and would not install pkg files. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-01-20threads: Fix building with POSIX threads in MinGW.Andreas Schneider1-1/+1
BUG: https://red.libssh.org/issues/181 Originally written by Patrick von Reth <vonreth () kde ! org>. This patch is part of the larger patch: https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/changes/portage/win32libs/libssh/0002-add-a-way-to-test-ssh-connections-on-windows.patch MinGW (in particular, the MinGW-w64 fork) can use either posix threads or win32 threads. This patch fixes the MinGW build when using posix threads. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-27cmake: Fix the build on Windows.Andreas Schneider1-66/+68
2012-03-09Fix typo.Andreas Schneider1-1/+1
2011-06-01cmake: Fix static .lib overwriting on Windows.Andreas Schneider1-3/+20
2010-12-30threads: Fixed ssh_pthread_thread_id with mingw.Andreas Schneider1-1/+5
2010-09-30Changed the threads cbks from struct to publ funcAris Adamantiadis1-1/+5
2010-09-12Changed callbacks typeAris Adamantiadis1-13/+1
2010-09-09build: Remove unneeded debug message.Andreas Schneider1-2/+0
2010-09-08build: Improve pthread detection.Andreas Schneider1-2/+2
2010-09-08build: Make sure LIBSSH_THREADS_LINK_LIBRARIES is in the cache.Andreas Schneider1-5/+7
2010-09-08build: Fixed linking against libssh in thread library.Andreas Schneider1-2/+2
2010-09-06Implemented the noop and native pointersAris Adamantiadis3-41/+52
2010-09-06threads: Build a libssh threading library.Andreas Schneider3-0/+116
2010-09-06Moved pthread specific code in src/threads/pthread.cAris Adamantiadis1-0/+84
pthread example doesn't compile du to the lack of libssh_threads_native.so library