diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:11:32 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 23:11:32 +0000 |
commit | d2c8928d306861a39cc7c341e09f7e66b8f1c649 (patch) | |
tree | 4c11599bf8b3287a2c57ea361b3d9e47a09b58c4 /node.c | |
parent | 43df67ad041fda13c795b8b91fc45e8b71c047cf (diff) |
Fix build against libpthread
* configure.ac: Link against libpthread instead of libthreads.
Explicitly link against libshouldbeinlibc.
* cvs_tree.c: Include <pthread.h>, use pthread functions instead of Mach
cthreads functions.
* cvsfs.h: Likewise.
* netfs.c: Likewise.
* node.c: Likewise.
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; |