From d2c8928d306861a39cc7c341e09f7e66b8f1c649 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 11 Feb 2013 23:11:32 +0000 Subject: Fix build against libpthread * configure.ac: Link against libpthread instead of libthreads. Explicitly link against libshouldbeinlibc. * cvs_tree.c: Include , use pthread functions instead of Mach cthreads functions. * cvsfs.h: Likewise. * netfs.c: Likewise. * node.c: Likewise. --- node.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'node.c') diff --git a/node.c b/node.c index a7b0908e8..658998419 100644 --- a/node.c +++ b/node.c @@ -35,24 +35,24 @@ cvsfs_make_node(struct netnode *nn) { struct node *node; - rwlock_writer_lock(&nn->lock); + pthread_rwlock_wrlock(&nn->lock); if(nn->node) { /* there already is a node structure, just return another reference * to this one, instead of wasting memory for yet another one */ - mutex_lock(&nn->node->lock); + pthread_mutex_lock(&nn->node->lock); netfs_nref(nn->node); - mutex_unlock(&nn->node->lock); + pthread_mutex_unlock(&nn->node->lock); - rwlock_writer_unlock(&nn->lock); + pthread_rwlock_unlock(&nn->lock); return nn->node; } if(! (node = netfs_make_node(nn))) { - rwlock_writer_unlock(&nn->lock); + pthread_rwlock_unlock(&nn->lock); return NULL; } @@ -124,7 +124,7 @@ cvsfs_make_node(struct netnode *nn) node->nn_stat.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH); nn->node = node; - rwlock_writer_unlock(&nn->lock); + pthread_rwlock_unlock(&nn->lock); return node; } @@ -148,7 +148,7 @@ cvsfs_make_virtual_node(struct netnode *nn, struct revision *rev) if(! new_nn) return NULL; - rwlock_init(&new_nn->lock); + pthread_rwlock_init(&new_nn->lock, NULL); new_nn->sibling = NULL; new_nn->parent = NULL; -- cgit v1.2.3