2016-10-05 09:33:37 -04:00
|
|
|
/*
|
|
|
|
FUSE: Filesystem in Userspace
|
|
|
|
Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
|
|
|
|
|
|
|
|
This program can be distributed under the terms of the GNU LGPLv2.
|
|
|
|
See the file COPYING.LIB.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "fuse_i.h"
|
|
|
|
#include "fuse_misc.h"
|
|
|
|
#include "fuse_lowlevel.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
2022-11-06 00:25:25 -04:00
|
|
|
int
|
|
|
|
fuse_loop_mt(struct fuse *f)
|
2016-10-05 09:33:37 -04:00
|
|
|
{
|
2020-07-31 23:50:47 -04:00
|
|
|
if (f == NULL)
|
|
|
|
return -1;
|
2016-10-05 09:33:37 -04:00
|
|
|
|
2021-08-30 07:59:21 -04:00
|
|
|
int res = fuse_start_maintenance_thread(f);
|
2020-07-31 23:50:47 -04:00
|
|
|
if (res)
|
|
|
|
return -1;
|
2016-10-05 09:33:37 -04:00
|
|
|
|
2020-07-31 23:50:47 -04:00
|
|
|
res = fuse_session_loop_mt(fuse_get_session(f),
|
2022-11-29 17:24:09 -06:00
|
|
|
fuse_config_read_thread_count(f),
|
2023-02-04 23:11:54 -05:00
|
|
|
fuse_config_process_thread_count(f),
|
|
|
|
fuse_config_pin_threads(f));
|
2021-08-30 07:59:21 -04:00
|
|
|
|
|
|
|
fuse_stop_maintenance_thread(f);
|
|
|
|
|
2020-07-31 23:50:47 -04:00
|
|
|
return res;
|
2016-10-05 09:33:37 -04:00
|
|
|
}
|