diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-30 15:28:07 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-30 15:28:07 +0100 |
commit | 748ef0df0ae891c65043a2a3c8d0f29cad358f5a (patch) | |
tree | 02a3725d7e1885d063474de92db351e90c03863b /src/fuse_i.h | |
parent | cd50c0de1db93520000bfb907caf07e51aa6cec5 (diff) |
Switch from __thread to pthread_key_t for fuse_contextlibfuse/pinotree/fuse-improvements/master
This allows to properly cleanup the per-thread context.
* src/fuse_i.h (libfuse_ctx): Remove declaration.
* src/main.c (libfuse_ctx): Remove variable.
(libfuse_ctx_key): New variable.
(fuse_destroy_context): New function.
(fuse_create_key): Likewise.
(fuse_new): Use fuse_get_context instead of libfuse_ctx.
(fuse_get_context): Create fuse_create_key only once. Allocate a new
struct fuse_context if needed, and return it.
* src/netfs.c (update_context_struct): Use fuse_get_context instead of
libfuse_ctx.
Diffstat (limited to 'src/fuse_i.h')
-rw-r--r-- | src/fuse_i.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/fuse_i.h b/src/fuse_i.h index 472bc6503..851058d65 100644 --- a/src/fuse_i.h +++ b/src/fuse_i.h @@ -57,8 +57,6 @@ extern struct fuse *libfuse_fuse; #define FUSE_SYMVER(x) __asm__(x) -extern __thread struct fuse_context *libfuse_ctx; - extern void update_context_struct(struct iouser *cred, struct fuse *fuse); /***************************************************************************** |