diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2009-09-19 09:47:30 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2009-09-19 09:47:30 +0300 |
commit | e599bba4216c0edb8cc8f40adad3a6dba88685f4 (patch) | |
tree | d52c699f599e276ff65302e5854a26998da1a928 /src/xz/hardware.c | |
parent | Fix incorrect use of "restrict". (diff) | |
download | xz-e599bba4216c0edb8cc8f40adad3a6dba88685f4.tar.xz |
Various changes.
Separate a few reusable components from XZ Utils specific
code. The reusable code is now in "tuklib" modules. A few
more could be separated still, e.g. bswap.h.
Fix some bugs in lzmainfo.
Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol
for help.
Add OpenVMS support into physmem. Add a few #ifdefs to ease
building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the
original patch.
Diffstat (limited to 'src/xz/hardware.c')
-rw-r--r-- | src/xz/hardware.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xz/hardware.c b/src/xz/hardware.c index 72dc2cb1..cb094abd 100644 --- a/src/xz/hardware.c +++ b/src/xz/hardware.c @@ -11,8 +11,8 @@ /////////////////////////////////////////////////////////////////////////////// #include "private.h" -#include "physmem.h" -#include "cpucores.h" +#include "tuklib_physmem.h" +#include "tuklib_cpucores.h" /// Maximum number of free *coder* threads. This can be set with @@ -28,7 +28,7 @@ hardware_threadlimit_set(uint32_t new_threadlimit) { if (new_threadlimit == 0) { // The default is the number of available CPU cores. - threadlimit = cpucores(); + threadlimit = tuklib_cpucores(); if (threadlimit == 0) threadlimit = 1; } else { @@ -66,7 +66,7 @@ hardware_memlimit_set_percentage(uint32_t percentage) assert(percentage > 0); assert(percentage <= 100); - uint64_t mem = physmem(); + uint64_t mem = tuklib_physmem(); // If we cannot determine the amount of RAM, assume 32 MiB. Maybe // even that is too much on some systems. But on most systems it's |