diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-09-03 18:28:52 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-09-03 18:28:52 +0000 |
commit | 38f152c72decfc8a995c8a9fa7f932f348d0e1e2 (patch) | |
tree | 79a26409e8599e29341c0ec68662a754717efaad /lib/fuse.c | |
parent | 16dbf945f09eb6c84c51b59061dd62c76d3ececd (diff) | |
download | libfuse-38f152c72decfc8a995c8a9fa7f932f348d0e1e2.tar.gz |
fix
Diffstat (limited to 'lib/fuse.c')
-rw-r--r-- | lib/fuse.c | 20 |
1 files changed, 3 insertions, 17 deletions
@@ -10,10 +10,10 @@ /* For pthread_rwlock_t */ #define _GNU_SOURCE -#include "config.h" #include "fuse_i.h" #include "fuse_lowlevel.h" #include "fuse_opt.h" +#include "fuse_misc.h" #include <stdio.h> #include <string.h> @@ -25,7 +25,6 @@ #include <limits.h> #include <errno.h> #include <assert.h> -#include <pthread.h> #include <sys/param.h> #include <sys/uio.h> @@ -110,19 +109,6 @@ static void fuse_do_release(struct fuse *, char *, struct fuse_file_info *); static int fuse_do_opendir(struct fuse *, char *, struct fuse_file_info *); static int fuse_do_statfs(struct fuse *, struct statvfs *); -#ifndef USE_UCLIBC -#define mutex_init(mut) pthread_mutex_init(mut, NULL) -#else -static void mutex_init(pthread_mutex_t *mut) -{ - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP); - pthread_mutex_init(mut, &attr); - pthread_mutexattr_destroy(&attr); -} -#endif - static struct node *get_node_nocheck(struct fuse *f, fuse_ino_t nodeid) { size_t hash = nodeid % f->id_table_size; @@ -1432,7 +1418,7 @@ static void fuse_opendir(fuse_req_t req, fuse_ino_t ino, dh->len = 0; dh->filled = 0; dh->nodeid = ino; - mutex_init(&dh->lock); + fuse_mutex_init(&dh->lock); llfi->fh = (uintptr_t) dh; @@ -2146,7 +2132,7 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args, goto out_free_name_table; } - mutex_init(&f->lock); + fuse_mutex_init(&f->lock); pthread_rwlock_init(&f->tree_lock, NULL); f->compat = compat; |