Age | Commit message (Collapse) | Author |
|
The ad-hoc sys-based probe of cpus works fine on Linux, but it's
not really preferable when Linux's sysconf supports
_SC_NPROCESSORS_ONLN, and there's a chance non-Linux's will
support it too.
Supposedly even Emscripten supports this, and will report the
number of available WebWorkers through this interface, even with
pthreads emulation. I'm curious if that actually works, getting
wasm builds of rototiller demos could be fun.
|
|
This makes TIL_MAXCPUS a proper thing
|
|
The win32 and mach builds were free to violate this, as it's
always just been a local define for putting some kind of bound on
the linux "/sys/devices/system/cpu/cpuN" probing loop.
But in preparation for moving TIL_MAXCPUS out to til_util.h for
public consumption in sizing per-cpu arrays, it needs to actually
be enforced consistently as an upper bound cap. That way
everything can safely assume n_cpus won't ever exceed
TIL_MAXCPUS.
|
|
Without this mac builds w/brew must be falling through the
single CPU default linux failure code.
|
|
Largely mechanical rename of librototiller -> libtil, but
introducing a til_ prefix to all librototiller (now libtil)
functions and types where a rototiller prefix was absent.
This is just a step towards a more libized librototiller, and til
is just a nicer to type/read prefix than rototiller_.
|