summaryrefslogtreecommitdiff
path: root/tarfs.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:51:34 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:51:34 +0000
commit3f06ded61ba1373f44e87d1f6d266fb3baa29314 (patch)
tree90d28ef7d22402021f3a4fddd41c6d2bc674f629 /tarfs.h
parent7fc534e167e8ebf3e7267fca5db7e34c9bc15538 (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 'tarfs.h')
-rw-r--r--tarfs.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tarfs.h b/tarfs.h
index 9e3923999..2cc55ac92 100644
--- a/tarfs.h
+++ b/tarfs.h
@@ -77,7 +77,7 @@ struct tar_item
struct tar_list
{
struct tar_item *head;
- struct mutex lock;
+ pthread_mutex_t lock;
};
/* Unless stated otherwise, all the following functions taking a tar_list
@@ -114,13 +114,13 @@ extern void tar_put_item (struct tar_item **prev_tar, struct tar_item *tar);
/* An iterator. */
#define tar_list_iterate(List, Item, Expr1, Expr2) \
- for ((Item) = (mutex_lock (&(List)->lock), (List)->head); \
+ for ((Item) = (pthread_mutex_lock (&(List)->lock), (List)->head); \
(Expr1); (Expr2))
/* These two macros can be used to implement critical things (e.g. traversing
the whole list). */
-#define tar_list_lock(List) mutex_lock (&(List)->lock);
-#define tar_list_unlock(List) mutex_unlock (&(List)->lock);
+#define tar_list_lock(List) pthread_mutex_lock (&(List)->lock);
+#define tar_list_unlock(List) pthread_mutex_unlock (&(List)->lock);
/** Node information. **/