mirror of https://github.com/trapexit/mergerfs.git
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.
21 lines
254 B
21 lines
254 B
#pragma once
|
|
|
|
#include "fs_lstat.hpp"
|
|
|
|
namespace thread_info
|
|
{
|
|
static
|
|
inline
|
|
int
|
|
process_count()
|
|
{
|
|
int rv;
|
|
struct stat st;
|
|
|
|
rv = fs::lstat("/proc/self/task",&st);
|
|
if(rv < 0)
|
|
return rv;
|
|
|
|
return (st.st_nlink - 2);
|
|
}
|
|
}
|