summaryrefslogtreecommitdiffstats
path: root/fuse/fuse_loop_mt.c
diff options
context:
space:
mode:
authorFlemmard <flemmard@gmail.com>2014-03-10 20:18:45 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-06-30 19:01:33 +0200
commit60bf94ec27a04dfee53b16e9a7e40f1e599b6d00 (patch)
tree255845dae9703d57e194617b4ef2eb3d7db75d50 /fuse/fuse_loop_mt.c
parentlibdl should also be linked to binary (diff)
downloadandroid_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar.gz
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar.bz2
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar.lz
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar.xz
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.tar.zst
android_bootable_recovery-60bf94ec27a04dfee53b16e9a7e40f1e599b6d00.zip
Diffstat (limited to 'fuse/fuse_loop_mt.c')
-rw-r--r--fuse/fuse_loop_mt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fuse/fuse_loop_mt.c b/fuse/fuse_loop_mt.c
index 7e400c2a4..aefc3ec98 100644
--- a/fuse/fuse_loop_mt.c
+++ b/fuse/fuse_loop_mt.c
@@ -81,9 +81,13 @@ static void *fuse_do_work(void *data)
};
int res;
+#ifndef ANDROID
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+#endif
res = fuse_session_receive_buf(mt->se, &fbuf, &ch);
+#ifndef ANDROID
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+#endif
if (res == -EINTR)
continue;
if (res <= 0) {
@@ -245,8 +249,13 @@ int fuse_session_loop_mt(struct fuse_session *se)
while (!fuse_session_exited(se))
sem_wait(&mt.finish);
+#ifndef ANDROID
for (w = mt.main.next; w != &mt.main; w = w->next)
pthread_cancel(w->thread_id);
+#else
+ for (w = mt.main.next; w != &mt.main; w = w->next)
+ pthread_kill(w->thread_id, SIGUSR1);
+#endif
mt.exit = 1;
while (mt.main.next != &mt.main)