diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:40:51 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:40:51 +0000 |
commit | 95d1e56669c825875eb47351547d8b545ac1ccaa (patch) | |
tree | bdaae43f755b39283d34194b8231ef8569e9108b /ncache.c | |
parent | 766b22d88d180248ed427ff93b5f5dc85498fbe3 (diff) | |
parent | c159a059bdc152931e22f2e86553acb25c78183a (diff) |
Merge branch 'nsmux' into nsmux-notifynsmux-notify
Diffstat (limited to 'ncache.c')
-rw-r--r-- | ncache.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -59,7 +59,7 @@ void ncache_init (void) ncache.size_current = 0; /*Init the lock */ - mutex_init (&ncache.lock); + pthread_mutex_init (&ncache.lock, NULL); } /*ncache_init */ /*---------------------------------------------------------------------------*/ @@ -90,7 +90,7 @@ error_t ncache_node_lookup (lnode_t * lnode, /*search for this */ if (!err) { /*lock the mutex in the looked up node */ - mutex_lock (&n->lock); + pthread_mutex_lock (&n->lock); /*store the lookup result in `node` */ *node = n; @@ -146,14 +146,14 @@ ncache_reset (void) node_t *node; /*Acquire a lock on the cache */ - mutex_lock (&ncache.lock); + pthread_mutex_lock (&ncache.lock); /*Release the whole cache chain */ for (node = ncache.mru; node != NULL; ncache_node_remove (node), node = ncache.mru); /*Release the lock */ - mutex_unlock (&ncache.lock); + pthread_mutex_unlock (&ncache.lock); } /*ncache_reset */ /*---------------------------------------------------------------------------*/ @@ -161,7 +161,7 @@ ncache_reset (void) void ncache_node_add (node_t * node) { /*Acquire a lock on the cache */ - mutex_lock (&ncache.lock); + pthread_mutex_lock (&ncache.lock); /*If there already are some nodes in the cache already */ if (ncache.size_current > 0) @@ -216,7 +216,7 @@ void ncache_node_add (node_t * node) } */ /*Release the lock on the cache */ - mutex_unlock (&ncache.lock); + pthread_mutex_unlock (&ncache.lock); } /*ncache_node_add */ /*---------------------------------------------------------------------------*/ |