diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:38:09 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:38:09 +0000 |
commit | c159a059bdc152931e22f2e86553acb25c78183a (patch) | |
tree | bcef5c40fbde6952bd60e0e139bdceb52de2fa09 /lnode.c | |
parent | 7993b3db57070ec6b37bdac13f9edf9362861f16 (diff) |
Fix build against libpthread
* Makefile.am (nsmux_LDADD): Link against libpthread instead of
libthreads.
* nsmux.h: Include <pthread.h> instead of <cthreads.h>
* lnode.h: Use pthread type instead of cthreads structure.
* node.h: Likewise.
* ncache.h: Likewise.
* lnode.c: Use pthread functions instead of cthreads functions.
* node.c: Likewise.
* ncache.c: Likewise.
* nsmux.c: Likewise.
Diffstat (limited to 'lnode.c')
-rw-r--r-- | lnode.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -61,7 +61,7 @@ void lnode_ref_remove (lnode_t * node) } else /*simply unlock the node */ - mutex_unlock (&node->lock); + pthread_mutex_unlock (&node->lock); } /*lnode_ref_remove */ /*---------------------------------------------------------------------------*/ @@ -108,8 +108,8 @@ error_t lnode_create (char *name, lnode_t ** node) node_new->references = 1; /*Initialize the mutex and acquire a lock on this lnode */ - mutex_init (&node_new->lock); - mutex_lock (&node_new->lock); + pthread_mutex_init (&node_new->lock, NULL); + pthread_mutex_lock (&node_new->lock); /*Store the result in the second parameter */ *node = node_new; @@ -239,7 +239,7 @@ error_t lnode_get (lnode_t * dir, /*search here */ if (n) { /*lock the node */ - mutex_lock (&n->lock); + pthread_mutex_lock (&n->lock); /*increment the refcount of the found lnode */ lnode_ref_add (n); @@ -338,7 +338,7 @@ void lnode_remove_proxy (lnode_t * node, node_t * proxy) node_list_t p; /*Lock the lnode */ - mutex_lock (&node->lock); + pthread_mutex_lock (&node->lock); /*If the first cell in the list contains a reference to `proxy` */ if (node->proxies->node == proxy) @@ -356,7 +356,7 @@ void lnode_remove_proxy (lnode_t * node, node_t * proxy) lnode_ref_remove (node); /*stop right here */ - mutex_unlock (&node->lock); + pthread_mutex_unlock (&node->lock); return; } @@ -389,7 +389,7 @@ void lnode_remove_proxy (lnode_t * node, node_t * proxy) /*Unlock the node */ - mutex_unlock (&node->lock); + pthread_mutex_unlock (&node->lock); return; } /*lnode_remove_proxy */ |