Not all online CPUs may be available for the current process,
especially when CPU affinity is involved. In such cases too many
threads will be created, which will unnecessarily compete for CPU
time.
Use sched_getaffinity() (if available) to determine the correct
number of threads to create.
In read_thread(), in the "Do we need this block?" block, it failed
to advance to the next wanted_t when w->end is exactly equal to uend.
In the particular case I looked at, this resulted in read_thread()
erroneously putting two blocks into the queue (pipeline_split(),
read.c:570) instead of one.
This resulted in a subsequent crash in tar_read() at read.c:660,
where gArWanted was null (when clearly the code does not expect it
to be null at that point).
My use case:
I have several hundred large .tar.xz files (created by pixz). Each
archive contains over 200k files. I frequently need to extract a lot
of files from each archive, but not all files, only a specific subset.
So I am making heavy use of the -x option to pixz.
Architectures like SPARC do not allow unaligned accesses. Avoid them by
memcpy()ing the data to an aligned buffer. On x86 systems where
unaligned loads are fast, the memcpy() will be compiled away and the
same code generated as before.
- adds man page to `EXTRA_DIST`
- `configure` checks for `a2x` only if the man page does not exist (poor
mans way of checking if we build from git or release tarball)
- fixes#50
Unfortunately, a2x generates the manpage only in the directory where the
source file is located and it does not offer a command line option to
change the output directory. I hope, the `if ! test -f` hack I
implemented works everywhere.
- `__APPLE__` vs `__OS2__` - does this actually work? Would some please test on apple and give feedback?
- pthread via `AX_PTHREAD`
- version via `PACKAGE_VERSION` in `config.h`
- large file support via `AC_SYS_LARGEFILE`