mergerfs/libfuse/lib/fuse_mt.c

33 lines
663 B
C
Raw Permalink Normal View History

/*
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>
int fuse_loop_mt(struct fuse *f)
{
2020-02-18 20:53:33 -05:00
if (f == NULL)
return -1;
2020-02-18 20:53:33 -05:00
int res = fuse_start_cleanup_thread(f);
if (res)
return -1;
2020-02-18 20:53:33 -05:00
res = fuse_session_loop_mt(fuse_get_session(f),
fuse_config_num_threads(f));
fuse_stop_cleanup_thread(f);
return res;
}