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

[PATCH 0/1] trace2: fix tracing when NO_PTHREADS is defined

From
JGJeff Hostetler via GitGitGadget <gitgitgadget@gmail.com>
Date
May 21, 2019, 19:33 UTC
Message-ID
<pull.222.git.gitgitgadget@gmail.com>

This commit addresses the problem reported in: https://public-inbox.org/git/92cfdf43-8841-9c5a-7838-dda995038908@jeffhostetler.com/T/#mbaf8069f6d1bc18d5a02d3682a1f9282f5547ea9

As Duy suggested, pthread_getspecific() just returns NULL when NO_PTHREADS is defined. And pthread_setspecific() silently does not nothing. So this problem was hidden from view.

I have to wonder if we should update pthread_*specific() to call BUG() when NO_PTHREADS is defined as a way to catch unguarded usages easier or make this issue more clear.

Jeff Hostetler (1):
  trace2: fix tracing when NO_PTHREADS is defined
 trace2/tr2_tls.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
base-commit: aa25c82427ae70aebf3b8f970f2afd54e9a2a8c6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-222%2Fjeffhostetler%2Ftrace2-no-pthread-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-222/jeffhostetler/trace2-no-pthread-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/222
-- 
gitgitgadget
Next: Jeff Hostetler via GitGitGadget
Message 1 of 10 in “trace2: fix tracing when NO_PTHREADS is defined”
  1. 0/1 trace2: fix tracing when NO_PTHREADS is definedJeff Hostetler via GitGitGadget, May 21, 2019
  2. 1/1 trace2: fix tracing when NO_PTHREADS is definedJeff Hostetler via GitGitGadget, May 21, 2019
  3. Jeff KingMay 21, 2019
  4. Jeff HostetlerMay 22, 2019
  5. Jeff KingMay 23, 2019
  6. Jeff HostetlerMay 23, 2019
  7. Duy NguyenMay 25, 2019
  8. Jeff KingMay 28, 2019
  9. Jeff HostetlerMay 28, 2019
  10. Junio C HamanoMay 28, 2019

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.