aboutsummaryrefslogtreecommitdiff
path: root/src/xz/hardware.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-14 00:45:29 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-14 00:45:29 +0200
commit3084d662d2646ab7eb58daf0dc32cf3f9a74eec7 (patch)
tree6601b6dee1b3c35b6894d71fcdbf1554801aff4f /src/xz/hardware.h
parentInitial port to DOS using DJGPP. (diff)
downloadxz-3084d662d2646ab7eb58daf0dc32cf3f9a74eec7.tar.xz
Cleanups to the code that detects the amount of RAM and
the number of CPU cores. Added support for using sysinfo() on Linux systems whose libc lacks appropriate sysconf() support (at least dietlibc). The Autoconf macros were split into separate files, and CPU core count detection was moved from hardware.c to cpucores.h. The core count isn't used for anything real for now, so a problematic part in process.c was commented out.
Diffstat (limited to 'src/xz/hardware.h')
-rw-r--r--src/xz/hardware.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xz/hardware.h b/src/xz/hardware.h
index a6d91d78..36761fd1 100644
--- a/src/xz/hardware.h
+++ b/src/xz/hardware.h
@@ -17,14 +17,19 @@
//
///////////////////////////////////////////////////////////////////////////////
-extern size_t opt_threads;
-
-
/// Initialize some hardware-specific variables, which are needed by other
/// hardware_* functions.
extern void hardware_init(void);
+/// Set custom value for maximum number of coder threads.
+extern void hardware_threadlimit_set(uint32_t threadlimit);
+
+/// Get the maximum number of coder threads. Some additional helper threads
+/// are allowed on top of this).
+extern uint32_t hardware_threadlimit_get(void);
+
+
/// Set custom memory usage limit. This is used for both encoding and
/// decoding. Zero indicates resetting the limit back to defaults.
extern void hardware_memlimit_set(uint64_t memlimit);