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.

32 lines
663 B

5 years ago
5 years ago
5 years ago
  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 fuse_loop_mt(struct fuse *f)
  16. {
  17. if (f == NULL)
  18. return -1;
  19. int res = fuse_start_cleanup_thread(f);
  20. if (res)
  21. return -1;
  22. res = fuse_session_loop_mt(fuse_get_session(f),
  23. fuse_config_num_threads(f));
  24. fuse_stop_cleanup_thread(f);
  25. return res;
  26. }