Re: [PATCH 3/9] trace2: defer free of TLS CTX until program exit.
- From
- Jeff Hostetler <git@jeffhostetler.com>
- Date
- Dec 22, 2021, 21:59 UTC
- Message-ID
- <a6f2a38b-926a-4b47-fd3f-b1327a7c3fcb@jeffhostetler.com>
- In-Reply-To
- <xmqqlf0equs3.fsf@gitster.g>
On 12/21/21 2:30 AM, Junio C Hamano wrote:
Show 17 quoted lines
> "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com> writes: > >> From: Jeff Hostetler <jeffhost@microsoft.com> >> >> Defer freeing of the Trace2 thread CTX data until program exit. >> Create a global list of thread CTX data to own the storage. >> >> TLS CTX data is allocated when a thread is created and associated >> with that thread. Previously, that storage was deleted when the >> thread exited. Now we simply disassociate the CTX data from the >> thread when it exits and let the global CTX list manage the cleanup. > > By the way, TLS CTX sounds embarrassingly close and confusing to > some function that we may find in say openssl or some crypto stuff > X-<. Was there a strong reason to avoid calling these functions and > types something like tr2_thread_ctx instead of tr2tls_thread_ctx? >
I hadn't really thought about the term "TLS" in the context of crypto -- I had "thread local storage" on the brain. I guess I've spent too much of my youth using Win32 thread APIs. :-)
Let me take a look at removing those terms.
Jeff