mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 12:33:24 +00:00
![]() The Mach-O format does not permit gcc to implement the __thread TLS specification, so we must instead emulate it using a single int cell allocated from memory and stored inside of the thread specific data associated with the current pthread. What makes this tricky is git_errno must be a valid lvalue, so we really need to return a pointer to the caller and deference it as part of the git_errno macro. The GCC-specific __attribute__((constructor)) extension is used to ensure the pthread_key_t is allocated before any Git functions are executed in the library, as this is necessary to access our thread specific storage. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> |
||
---|---|---|
src | ||
tests | ||
.gitignore | ||
.HEADER | ||
api.doxygen | ||
CONVENTIONS | ||
COPYING | ||
git.git-authors | ||
libgit2.pc.in | ||
Makefile |