aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-09-30 11:10:08 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-09-30 11:10:08 +0200
commit5b1c985a0e7df03aefffa13bc6c765859819a180 (patch)
tree28deab689a0218f7a2f89e13910881fd4a4bbd88 /src
parentbedc65313f884f9b157822f4705c8e00accfd73f (diff)
downloadlibssh-5b1c985a0e7df03aefffa13bc6c765859819a180.tar.gz
libssh-5b1c985a0e7df03aefffa13bc6c765859819a180.tar.xz
libssh-5b1c985a0e7df03aefffa13bc6c765859819a180.zip
Changed the threads cbks from struct to publ func
Diffstat (limited to 'src')
-rw-r--r--src/threads.c6
-rw-r--r--src/threads/pthread.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/threads.c b/src/threads.c
index 60d5dee5..db7c216c 100644
--- a/src/threads.c
+++ b/src/threads.c
@@ -39,7 +39,7 @@ static unsigned long threads_id_noop (void){
return 1;
}
-struct ssh_threads_callbacks_struct ssh_threads_noop =
+static struct ssh_threads_callbacks_struct ssh_threads_noop =
{
"threads_noop",
threads_noop,
@@ -49,6 +49,10 @@ struct ssh_threads_callbacks_struct ssh_threads_noop =
threads_id_noop
};
+struct ssh_threads_callbacks_struct *ssh_threads_get_noop(){
+ return &ssh_threads_noop;
+}
+
static struct ssh_threads_callbacks_struct *user_callbacks =&ssh_threads_noop;
#ifdef HAVE_LIBGCRYPT
diff --git a/src/threads/pthread.c b/src/threads/pthread.c
index 84966d01..fdfd27d0 100644
--- a/src/threads/pthread.c
+++ b/src/threads/pthread.c
@@ -78,7 +78,7 @@ static unsigned long ssh_pthread_thread_id (void){
return (unsigned long) pthread_self();
}
-struct ssh_threads_callbacks_struct ssh_threads_pthread =
+static struct ssh_threads_callbacks_struct ssh_threads_pthread =
{
.type="threads_pthread",
.mutex_init=ssh_pthread_mutex_init,
@@ -88,4 +88,8 @@ struct ssh_threads_callbacks_struct ssh_threads_pthread =
.thread_id=ssh_pthread_thread_id
};
+struct ssh_threads_callbacks_struct *ssh_threads_get_pthread(){
+ return &ssh_threads_pthread;
+}
+
#endif /* HAVE_PTHREAD */