Re: [PATCH] pack-objects: Add runtime detection of online CPU's
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Feb 12, 2008, 08:27 UTC
- Message-ID
- <20080212082734.GC24004@spearce.org>
- In-Reply-To
- <47B156CD.1010209@op5.se>
Andreas Ericsson <ae@op5.se> wrote:
Show 21 quoted lines
> 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:
Show 6 quoted lines
> + > +extern int online_cpus(void); > + > +#endif /* THREAD_COMPAT_H */ > -- > 1.5.4.rc5.11.g0eab8
-- Shawn.