diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2008-03-07 11:22:11 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-03-07 11:22:11 +0000 |
commit | 72faaa58a85a0c8de724e8c22a4ec5b9f75e42e3 (patch) | |
tree | 5a1530608000614cbf1f43517b749bbe775bc9e4 /lib/fuse_loop_mt.c | |
parent | 230dc7115f1cbb3cb5030e6b89dc1fd3a9af691d (diff) |
Add queuing on contention to per-node lock algorithm...
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |