Commit 8f2ac818 authored by nextime's avatar nextime

write README

parent c0511e59
## pinthread
pinthread is a little library intended for use with LD_PRELOAD environment var.
I've wrote it cause in devuan we intesively use qemu-static to build packages for
different archs, but it doesn't work well with some processes using threads
when the base host is multicore, so, this library will override the
pthread_create() call and will pin the threads and the main process
to run only on a specific core, making qemu happy and avoiding a lot
of segfaults.
### Build:
just type make and, optionally, make install
### Usage:
LD_PRELOAD=/path/to/pinthread.so something
Environment variables:
* PINTHREAD_CORE: set to the core number you want to pin to.
if omitted, it defaults to the result of
sched_getcpu()
* PINTHREAD_PNAMES: accept a space separated list of strings,
if any string match the process name or
PINTHREAD_PNAMES is empty/omitted, it will
pin all thread according to PINTHREAD_CORE,
otherwise it will just call the "real"
pthread_create without any pinning.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment