diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:51:34 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:51:34 +0000 |
commit | 3f06ded61ba1373f44e87d1f6d266fb3baa29314 (patch) | |
tree | 90d28ef7d22402021f3a4fddd41c6d2bc674f629 /cache.c | |
parent | 7fc534e167e8ebf3e7267fca5db7e34c9bc15538 (diff) |
Fix build against libpthread
* Makefile (LDFLAGS): Replace -lthreads with -lpthread.
* cache.c: Use pthread functions instead of cthreads functions.
* cache.h: Likewise.
* debug.c: Likewise.
* netfs.c: Likewise.
* tarfs.c: Likewise.
* tarfs.h: Likewise.
* tarlist.c: Likewise.
* zipstores.c: Likewise.
Diffstat (limited to 'cache.c')
-rw-r--r-- | cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -32,8 +32,8 @@ #include "debug.h" /* Locking/unlocking a node's cache */ -#define LOCK(Node) mutex_lock (&CACHE_INFO ((Node), lock)) -#define UNLOCK(Node) mutex_unlock (&CACHE_INFO ((Node), lock)); +#define LOCK(Node) pthread_mutex_lock (&CACHE_INFO ((Node), lock)) +#define UNLOCK(Node) pthread_mutex_unlock (&CACHE_INFO ((Node), lock)); /* Tar file callback (in tarfs.c). */ static error_t (* read_file) (struct node *node, @@ -76,7 +76,7 @@ cache_create (struct node *node) CACHE_INFO (node, size) = blocks; debug (("Node %s: Initial block vector size: %u", node->nn->name, blocks)); - mutex_init (&CACHE_INFO (node, lock)); + pthread_mutex_init (&CACHE_INFO (node, lock), NULL); return 0; } |