Commit Graph

5 Commits

Author SHA1 Message Date
Martin Storsjö
f2bd22acd5 Use char instead of str_t 2014-02-10 08:06:37 +02:00
Martin Storsjö
8062596d23 Fix building threading for freebsd
FreeBSD (and at least NetBSD as well) still use hw.ncpu without
deprecating it, contrary to apple.
2014-01-26 10:40:24 +02:00
Martin Storsjö
5e10951c47 Use sysctl instead of the deprecated Gestalt API for getting the number of cores on OS X
Also use the __APPLE__ predefined define instead of MACOS for enabling
these code paths.

This also avoids having to link to the CoreServices framework in
order to get the Gestalt function.
2014-01-22 09:44:49 +02:00
Martin Storsjö
af6feaa45c Use sched_getaffinity to get the number of cores on linux
This gets rid of the code that parses /proc/cpuinfo, and avoids
forking within the library.

The previous code also failed build on modern glibc versions
due to ignoring the return value of the system, read and write
system calls.
2014-01-22 09:44:48 +02:00
Martin Storsjö
68f32c3c29 Move the WelsThreadLib files to the common directory/library
This simplifies building the thread library code via the
makefile based build system.
2014-01-21 15:11:07 +02:00