summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:30:17 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:30:17 +0000
commitf40f36c6a990bcc502cad4a343644f8354fec604 (patch)
tree0dc49c079af3dac88a147d0754d2cf994767b3fb /src/node.c
parent9aad0ed8c52b517da4f16b167a9e8926bb5d08be (diff)
Fix build against libpthread
* configure.ac: Link against libpthread instead of libthreads. * fuse.pc.in: Likewise. * src/fuse_i.h (libfuse_ctx): Declare TLS variable. (netnode): Turn lock field from struct mutex to pthread_mutex_t. * src/main.c (libfuse_ctx): Define TLS variable. (fuse_get_context): Use libfuse_ctx instead of cthreads TSD. * src/netfs.c: Likewise. Use pthread functions instead of cthreads functions. Use fixed stat structure. * src/netnode.c: Likewise. * src/node.c: Likewise.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index a09cc5c6b..87f880640 100644
--- a/src/node.c
+++ b/src/node.c
@@ -32,13 +32,13 @@ fuse_make_node(struct netnode *nn)
DEBUG("fuse_make_node", "creating node for %s.\n", nn->path);
DEBUG("netnode-lock", "locking netnode, path=%s\n", nn->path);
- mutex_lock(&nn->lock);
+ pthread_mutex_lock(&nn->lock);
if((node = nn->node))
{
/* there already is a node, therefore return another reference to it */
netfs_nref(node);
- mutex_unlock(&nn->lock);
+ pthread_mutex_unlock(&nn->lock);
DEBUG("netnode-lock", "UNlocking netnode, path=%s\n", nn->path);
DEBUG("fuse_make_node", "reusing already existing node, %s\n", nn->path);
return node;
@@ -46,7 +46,7 @@ fuse_make_node(struct netnode *nn)
if(! (node = netfs_make_node(nn)))
{
- mutex_unlock(&nn->lock);
+ pthread_mutex_unlock(&nn->lock);
DEBUG("netnode-lock", "UNlocking netnode, path=%s\n", nn->path);
return NULL; /* doesn't look to good for us :-( */
}
@@ -62,7 +62,7 @@ fuse_make_node(struct netnode *nn)
/* add pointer to our new node structure to the netnode */
nn->node = node;
- mutex_unlock(&nn->lock);
+ pthread_mutex_unlock(&nn->lock);
DEBUG("netnode-lock", "UNlocking netnode, path=%s\n", nn->path);
DEBUG("fuse_make_node", "created a new node for %s.\n", nn->path);
return node;