summaryrefslogtreecommitdiff
path: root/src/threadstate.h
Commit message (Collapse)AuthorAgeFilesLines
* thread: don't use the global tlsdata for thread exitEdward Thomson2020-10-111-6/+0
| | | | | | We want to store a pointer to emulate `pthread_exit` on Windows. Do this within the threading infrastructure so that it could potentially be re-used outside of the context of libgit2 itself.
* global: separate global state from thread-local stateEdward Thomson2020-10-111-0/+30
Our "global initialization" has accumulated some debris over the years. It was previously responsible for both running the various global initializers (that set up various subsystems) _and_ setting up the "global state", which is actually the thread-local state for things like error reporting. Separate the thread local state out into "threadstate". Use the normal subsystem initialization functions that we already have to set it up. This makes both the global initialization system and the threadstate system simpler to reason about.