Made pthread threading a user macro

This commit is contained in:
Aris Adamantiadis
2010-09-03 12:03:04 +02:00
parent aff5786ed3
commit 285388409f
3 changed files with 82 additions and 47 deletions

View File

@@ -1,6 +1,8 @@
#define LIBSSH_STATIC
#include <libssh/priv.h>
#include <libssh/callbacks.h>
#include <pthread.h>
#include <errno.h>
#include "torture.h"
#ifdef HAVE_LIBGCRYPT
@@ -10,8 +12,11 @@
#define NUM_LOOPS 20000
#endif
#define NUM_THREADS 100
SSH_THREADS_PTHREAD(ssh_pthread_callbacks);
static void setup(){
printf("setup\n");
ssh_threads_set_callbacks(&ssh_pthread_callbacks);
ssh_init();
}