aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_mt.c
blob: ee38b28646e7d45264ca818e7022150402b0ab54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
  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.h"
#include "fuse_lowlevel.h"

int fuse_loop_mt(struct fuse *f)
{
	if (f == NULL)
		return -1;

	int res = fuse_start_cleanup_thread(f);
	if (res)
		return -1;

	res = fuse_session_loop_mt(fuse_get_session(f));
	fuse_stop_cleanup_thread(f);
	return res;
}