From 72faaa58a85a0c8de724e8c22a4ec5b9f75e42e3 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 7 Mar 2008 11:22:11 +0000 Subject: Add queuing on contention to per-node lock algorithm... --- lib/fuse_loop_mt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/fuse_loop_mt.c') diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index c458d1e..05935d5 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -70,7 +70,11 @@ static void *fuse_do_work(void *data) while (!fuse_session_exited(mt->se)) { int isforget = 0; struct fuse_chan *ch = mt->prevch; - int res = fuse_chan_recv(&ch, w->buf, w->bufsize); + int res; + + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + res = fuse_chan_recv(&ch, w->buf, w->bufsize); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); if (res == -EINTR) continue; if (res <= 0) { @@ -124,6 +128,7 @@ static void *fuse_do_work(void *data) } sem_post(&mt->finish); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pause(); return NULL; -- cgit v1.2.3