Skip to content

trace2: fix tracing when NO_PTHREADS is defined

Jeff Hostetler via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1trace2: fix tracing when NO_PTHREADS is definedtrace2/tr2_tls.c+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

This commit addresses the problem reported in:
https://public-inbox.org/git/[email protected]/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

Signature · 1 line
gitgitgadget