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

Re: [PATCH 00/10] Reduce #ifdef NO_PTHREADS

From
Jeff King <peff@peff.net>
Date
Oct 27, 2018, 07:24 UTC
Message-ID
<20181027072447.GA26685@sigill.intra.peff.net>
In-Reply-To
<20181027071003.1347-1-pclouds@gmail.com>
On Sat, Oct 27, 2018 at 09:09:53AM +0200, Nguyễn Thái Ngọc Duy wrote:
Show 6 quoted lines
> People seemed to support the idea of removing these #ifdef NO_PTHREADS [1]
> so this is a complete series. I left the #ifdef in run-command.c and
> transport-helper.c because those code looked complicated so perhaps we
> could clean them up later. Even these updated files could be updated
> more, I think, to reduce some code duplication, but I tried to keep
> the change here minimal.

Some of the bits in run-command.c can probably be converted, but all of the "struct async" bits can't ever be. Because there the fallback is not "OK, let's just run a single thread" but a whole separate forking mechanism.

-Peff
Previous: Nguyễn Thái Ngọc DuyNext: Jeff King
Message 29 of 66 in “Reduce #ifdef NO_PTHREADS”
  1. 00/10 Reduce #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  2. 01/10 thread-utils: macros to unconditionally compile pthreads APINguyễn Thái Ngọc Duy, Oct 27, 2018
  3. Jeff KingOct 27, 2018
  4. Duy NguyenOct 27, 2018
  5. Jeff KingOct 27, 2018
  6. Duy NguyenOct 27, 2018
  7. 03/10 name-hash.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  8. 04/10 attr.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  9. 05/10 send-pack.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  10. Jeff KingOct 27, 2018
  11. 06/10 grep: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  12. Jeff KingOct 27, 2018
  13. Junio C HamanoOct 29, 2018
  14. Jeff KingOct 29, 2018
  15. Duy NguyenOct 29, 2018
  16. Jeff KingOct 29, 2018
  17. Junio C HamanoOct 30, 2018
  18. 02/10 index-pack: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  19. Jeff KingOct 27, 2018
  20. 07/10 preload-index.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  21. Ben PeartOct 29, 2018
  22. 08/10 pack-objects: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  23. 09/10 read-cache.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  24. Ben PeartOct 29, 2018
  25. Duy NguyenOct 29, 2018
  26. Ben PeartOct 29, 2018
  27. Junio C HamanoOct 30, 2018
  28. 10/10 Clean up pthread_create() error handlingNguyễn Thái Ngọc Duy, Oct 27, 2018
  29. Jeff KingOct 27, 2018
  30. Jeff KingOct 27, 2018
  31. Duy NguyenOct 27, 2018
  32. 00/10 Reduce #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  33. 01/10 thread-utils: macros to unconditionally compile pthreads APINguyễn Thái Ngọc Duy, Oct 27, 2018
  34. 02/10 index-pack: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  35. 04/10 attr.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  36. 03/10 name-hash.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  37. 05/10 grep: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  38. 06/10 preload-index.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  39. Ben PeartOct 29, 2018
  40. Duy NguyenOct 29, 2018
  41. Ben PeartOct 29, 2018
  42. Jeff KingOct 29, 2018
  43. 07/10 pack-objects: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  44. 08/10 read-cache.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 27, 2018
  45. Jeff KingOct 29, 2018
  46. Ben PeartOct 29, 2018
  47. Ben PeartOct 29, 2018
  48. 09/10 Clean up pthread_create() error handlingNguyễn Thái Ngọc Duy, Oct 27, 2018
  49. 10/10 read-cache.c: initialize copy_len to shut up gcc 8Nguyễn Thái Ngọc Duy, Oct 27, 2018
  50. Jeff KingOct 29, 2018
  51. 00/14 Reduce #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  52. 01/14 thread-utils: macros to unconditionally compile pthreads APINguyễn Thái Ngọc Duy, Nov 3, 2018
  53. 02/14 run-command.h: include thread-utils.h instead of pthread.hNguyễn Thái Ngọc Duy, Nov 3, 2018
  54. 03/14 send-pack.c: move async's #ifdef NO_PTHREADS back to run-command.cNguyễn Thái Ngọc Duy, Nov 3, 2018
  55. 04/14 index-pack: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  56. 05/14 name-hash.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  57. 06/14 attr.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  58. 07/14 grep: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  59. 09/14 preload-index.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  60. 08/14 grep: clean up num_threads handlingNguyễn Thái Ngọc Duy, Nov 3, 2018
  61. 10/14 pack-objects: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  62. 11/14 read-cache.c: remove #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  63. 12/14 read-cache.c: reduce branching based on HAVE_THREADSNguyễn Thái Ngọc Duy, Nov 3, 2018
  64. 13/14 read-cache.c: initialize copy_len to shut up gcc 8Nguyễn Thái Ngọc Duy, Nov 3, 2018
  65. 14/14 Clean up pthread_create() error handlingNguyễn Thái Ngọc Duy, Nov 3, 2018
  66. Junio C HamanoNov 6, 2018

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.