git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Andreas EricssonNext: Johannes Sixt
Message 2 of 22 in “pack-objects: Add runtime detection of online CPU's”
  1. pack-objects: Add runtime detection of online CPU'sAndreas Ericsson, Feb 12, 2008
  2. Shawn O. PearceFeb 12, 2008
  3. Johannes SixtFeb 12, 2008
  4. Bert WesargFeb 12, 2008
  5. Andreas EricssonFeb 12, 2008
  6. Michael HendricksFeb 12, 2008
  7. Brandon CaseyFeb 12, 2008
  8. pack-objects: Add runtime detection of online CPU'sBrandon Casey, Feb 23, 2008
  9. Andreas EricssonFeb 23, 2008
  10. pack-objects: Print a message describing the number of threads for packingBrandon Casey, Feb 23, 2008
  11. Jeff KingFeb 26, 2008
  12. Junio C HamanoFeb 26, 2008
  13. Jeff KingFeb 26, 2008
  14. Junio C HamanoFeb 26, 2008
  15. Jeff KingFeb 26, 2008
  16. Andreas EricssonFeb 26, 2008
  17. Brandon CaseyFeb 26, 2008
  18. Nicolas PitreFeb 26, 2008
  19. Jeff KingFeb 26, 2008
  20. Jeff KingFeb 26, 2008
  21. Brandon CaseyFeb 26, 2008
  22. Jeff KingFeb 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.