You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
673 B

  1. /*
  2. FUSE: Filesystem in Userspace
  3. Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
  4. This program can be distributed under the terms of the GNU LGPLv2.
  5. See the file COPYING.LIB.
  6. */
  7. #include "fuse_i.h"
  8. #include "fuse_misc.h"
  9. #include "fuse_lowlevel.h"
  10. #include <stdio.h>
  11. #include <stdlib.h>
  12. #include <string.h>
  13. #include <pthread.h>
  14. #include <assert.h>
  15. int
  16. fuse_loop_mt(struct fuse *f)
  17. {
  18. if (f == NULL)
  19. return -1;
  20. int res = fuse_start_maintenance_thread(f);
  21. if (res)
  22. return -1;
  23. res = fuse_session_loop_mt(fuse_get_session(f),
  24. fuse_config_num_threads(f));
  25. fuse_stop_maintenance_thread(f);
  26. return res;
  27. }