diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-09-01 14:07:45 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-09-01 14:07:45 +0200 |
commit | 8c55294ea9134c32f80d1a399a6a49ecdc9264b2 (patch) | |
tree | a21f32ae1501abf56c21f49f588503580a2c12ba /include/libssh/callbacks.h | |
parent | 50d8d75d890e16e8d4d3f4dd51de05812c0c3a1f (diff) | |
download | libssh-8c55294ea9134c32f80d1a399a6a49ecdc9264b2.tar.gz libssh-8c55294ea9134c32f80d1a399a6a49ecdc9264b2.tar.xz libssh-8c55294ea9134c32f80d1a399a6a49ecdc9264b2.zip |
Openssl implementation of threading + default imp
Diffstat (limited to 'include/libssh/callbacks.h')
-rw-r--r-- | include/libssh/callbacks.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h index 589c0aea..e66fb64e 100644 --- a/include/libssh/callbacks.h +++ b/include/libssh/callbacks.h @@ -248,6 +248,21 @@ typedef struct ssh_packet_callbacks_struct *ssh_packet_callbacks; */ LIBSSH_API int ssh_set_callbacks(ssh_session session, ssh_callbacks cb); +/** @} */ + +typedef int (*ssh_thread_callback) (void **lock); +typedef unsigned long (*ssh_thread_id_callback) (void); +struct ssh_threads_callbacks_struct { + ssh_thread_callback mutex_init; + ssh_thread_callback mutex_destroy; + ssh_thread_callback mutex_lock; + ssh_thread_callback mutex_unlock; + ssh_thread_id_callback thread_id; +}; + +LIBSSH_API int ssh_init_set_threads_callbacks(struct ssh_threads_callbacks_struct + *cb); + #ifdef __cplusplus } #endif |