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_misc.h | |
parent | 16dbf945f09eb6c84c51b59061dd62c76d3ececd (diff) |
fix
Diffstat (limited to 'lib/fuse_misc.h')
-rw-r--r-- | lib/fuse_misc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/fuse_misc.h b/lib/fuse_misc.h new file mode 100644 index 0000000..3a02655 --- /dev/null +++ b/lib/fuse_misc.h @@ -0,0 +1,27 @@ +/* + FUSE: Filesystem in Userspace + Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> + + This program can be distributed under the terms of the GNU LGPL. + See the file COPYING.LIB +*/ + +#include "config.h" +#include <pthread.h> + +#ifndef USE_UCLIBC +#define fuse_mutex_init(mut) pthread_mutex_init(mut, NULL) +#else +static inline void fuse_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 + + + + |