On 1 November 2011 15:57, niXman wrote:
>> What header is required for pthread_num_processors_np?
> pthread.h

OK.

This assumes that Pthreads is the only abstraction available on __hpux
(i.e. that if _GLIBCXX_HAS_GTHREADS is true then we have already
included <pthread.h>):

+#if defined(PTW32_VERSION) || \
+   (defined(__MINGW64_VERSION_MAJOR) && defined(_POSIX_THREADS)) || \
+   defined(__hpux)

Is that assumption safe?


>> Also, you should include <sys/sysctl.h> before calling sysctlbyname.
> On the right - yes.
> sysctlbyname() implicitly included in some header files.

The manual page says it requires <sys/sysctl.h> so please do that,
otherwise a future version of darwin or freebsd might stop implicitly
including it and break the code.

Reply via email to