summaryrefslogtreecommitdiffstats
path: root/src/bfstd.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-02-27 11:54:49 -0500
committerTavian Barnes <tavianator@tavianator.com>2025-02-27 11:54:49 -0500
commit5798978f77ef8c3efb3c99fa7fb9538c5c597024 (patch)
tree32d3fbcff0910b4c17a7b4b6048d2e0631d2abfe /src/bfstd.h
parenta561d782265c2157f270f0ead6b88db24e433d92 (diff)
downloadbfs-5798978f77ef8c3efb3c99fa7fb9538c5c597024.tar.xz
bfstd: New nproc() function
Diffstat (limited to 'src/bfstd.h')
-rw-r--r--src/bfstd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bfstd.h b/src/bfstd.h
index 84f92ec..28f473e 100644
--- a/src/bfstd.h
+++ b/src/bfstd.h
@@ -463,6 +463,11 @@ long xsysconf(int name);
#define sysoption(name) \
(_POSIX_##name == 0 ? xsysconf(_SC_##name) : _POSIX_##name)
+/**
+ * Get the number of CPU threads available to the current process.
+ */
+long nproc(void);
+
#include <wchar.h>
/**