aboutsummaryrefslogtreecommitdiffstats
path: root/src/dumm
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2009-12-17 15:58:12 +0100
committerTobias Brunner <tobias@strongswan.org>2009-12-23 17:03:41 +0100
commit4a5a5dd2900ed3b58381854e2c04ef23cd105645 (patch)
tree7f6b58cb8e1959731f8cb22746064ad2659260c3 /src/dumm
parentc48eea920334488eb4fcc208cc0ba68b6989c045 (diff)
downloadstrongswan-4a5a5dd2900ed3b58381854e2c04ef23cd105645.tar.bz2
strongswan-4a5a5dd2900ed3b58381854e2c04ef23cd105645.tar.xz
Using the thread wrapper in charon, libstrongswan and their plugins.
Diffstat (limited to 'src/dumm')
-rw-r--r--src/dumm/cowfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dumm/cowfs.c b/src/dumm/cowfs.c
index 0e83b77b1..f7b6b0cf3 100644
--- a/src/dumm/cowfs.c
+++ b/src/dumm/cowfs.c
@@ -29,12 +29,12 @@
#include <dirent.h>
#include <errno.h>
#include <sys/time.h>
-#include <pthread.h>
#include "cowfs.h"
#include <library.h>
#include <debug.h>
+#include <threading/thread.h>
/** define _XOPEN_SOURCE 500 fails when using libstrongswan, define popen */
extern ssize_t pread(int fd, void *buf, size_t count, off_t offset);
@@ -64,7 +64,7 @@ struct private_cowfs_t {
/** optional COW overlay */
int over_fd;
/** thread processing FUSE */
- pthread_t thread;
+ thread_t *thread;
};
/**
@@ -792,7 +792,7 @@ static void destroy(private_cowfs_t *this)
{
fuse_exit(this->fuse);
fuse_unmount(this->mount, this->chan);
- pthread_join(this->thread, NULL);
+ this->thread->join(this->thread);
fuse_destroy(this->fuse);
free(this->mount);
free(this->master);
@@ -862,7 +862,8 @@ cowfs_t *cowfs_create(char *master, char *host, char *mount)
this->host = strdup(host);
this->over = NULL;
- if (pthread_create(&this->thread, NULL, (void*)fuse_loop, this->fuse) != 0)
+ this->thread = thread_create((thread_main_t)fuse_loop, this->fuse);
+ if (!this->thread)
{
DBG1("creating thread to handle FUSE failed");
fuse_unmount(mount, this->chan);