summaryrefslogtreecommitdiff
path: root/src/til_util.c
AgeCommit message (Collapse)Author
2023-09-03til_utils: switch til_get_ncpus() to sysconfVito Caputo
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.
2023-06-05til_limits: introduce til_limits.h w/TIL_MAXCPUS insideVito Caputo
This makes TIL_MAXCPUS a proper thing
2023-06-05til_util: actually enforce TIL_MAXCPUS uniformlyVito Caputo
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.
2023-05-23util: add macos support for getting number of CPUsVito Caputo
Without this mac builds w/brew must be falling through the single CPU default linux failure code.
2021-10-01*: librototiller->libtilVito Caputo
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_.
© All Rights Reserved