summaryrefslogtreecommitdiff
path: root/tarlist.c
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 /tarlist.c
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 'tarlist.c')
-rw-r--r--tarlist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tarlist.c b/tarlist.c
index 22cabc7fd..f4321f1ca 100644
--- a/tarlist.c
+++ b/tarlist.c
@@ -36,7 +36,7 @@ void
tar_list_init (struct tar_list *list)
{
list->head = NULL;
- mutex_init (&list->lock);
+ pthread_mutex_init (&list->lock, NULL);
}
/* Make a tar item containing the given information. NEW points to the
@@ -71,7 +71,7 @@ tar_insert_item (struct tar_list *list,
assert (prev != new);
- mutex_lock (&list->lock);
+ pthread_mutex_lock (&list->lock);
head = &list->head;
if (! prev)
@@ -97,7 +97,7 @@ tar_insert_item (struct tar_list *list,
if (next)
next->prev = new;
- mutex_unlock (&list->lock);
+ pthread_mutex_unlock (&list->lock);
return 0;
}
@@ -136,9 +136,9 @@ tar_unlink_item_safe (struct tar_list *list, struct tar_item *item)
void
tar_unlink_item (struct tar_list *list, struct tar_item *tar)
{
- mutex_lock (&list->lock);
+ pthread_mutex_lock (&list->lock);
tar_unlink_item_safe (list, tar);
- mutex_unlock (&list->lock);
+ pthread_mutex_unlock (&list->lock);
}