Subject: Re: [PATCH] pack-objects: Add runtime detection of online CPU's

From: "Shawn O. Pearce" <[email-masked]>
Date: Tue, 12 Feb 2008 03:27:34 -0500

Andreas Ericsson <[email-masked]> wrote:
> diff --git a/thread-utils.h b/thread-utils.h
> new file mode 100644
> index 0000000..53754b3
> --- /dev/null
> +++ b/thread-utils.h
> @@ -0,0 +1,19 @@
> +#ifndef THREAD_COMPAT_H
> +#define THREAD_COMPAT_H
> +
> +#include "cache.h"
> +
> +#ifdef THREADED_DELTA_SEARCH
> +#include <pthread.h>
> +# ifdef _WIN32
> +#  define WIN32_LEAN_AND_MEAN
> +# include <windows.h>
> +# endif
> +# if defined(hpux) || defined(__hpux) || defined(_hpux)
> +#  include <sys/pstat.h>
> +# endif
> +#endif

Do we have to expose this mess of namespaces to those who include
thread-utils.h?  Seems like we don't, as online_cpus has a pretty
simple definition:

> +
> +extern int online_cpus(void);
> +
> +#endif /* THREAD_COMPAT_H */
> -- 
> 1.5.4.rc5.11.g0eab8

-- 
Shawn.