summaryrefslogtreecommitdiff
path: root/src/global.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename GIT_SSL to GIT_OPENSSLCarlos Martín Nieto2015-04-231-1/+1
| | | | | This is what it's meant all along, but now we actually have multiple implementations, it's clearer to use the name of the library.
* Rename routine to free TLS dataJeff Hostetler2015-04-181-1/+1
|
* Attempt to fix Windows TLS memory leak.Jeff Hostetler2015-04-171-0/+2
|
* Factor 40 and 41 constants from source.Ciro Santilli2014-09-161-1/+2
|
* oid: Export `git_oid_tostr_s` instead of `_allocfmt`vmg/tostr_sVicent Marti2014-08-181-0/+1
| | | | | | The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
* ssl: init everything all the timecmn/init-ssl-onceCarlos Martín Nieto2014-06-121-2/+0
| | | | | | | | Bring together all of the OpenSSL initialization to git_threads_init() so it's together and doesn't need locks. Moving it here also gives us libssh2 thread safety (when built against openssl).
* ssl: cargo-cult thread safetyCarlos Martín Nieto2014-06-121-0/+5
| | | | OpenSSL's tests init everything in the main thread, so let's do that.
* netops: init OpenSSL once under lockCarlos Martín Nieto2014-06-111-0/+2
| | | | | | | | The OpenSSL init functions are not reentrant, which means that running multiple fetches in parallel can cause us to crash. Use a mutex to init OpenSSL, and since we're adding this extra checks, init it only once.
* Add simple global shutdown hooksRussell Belfer2013-09-171-0/+4
| | | | | | | | | | Increasingly there are a number of components that want to do some cleanup at global shutdown time (at least if there are not going to be memory leaks). This creates a very simple system of shutdown hooks that will be invoked by git_threads_shutdown. Right now, the maximum number of hooks is hardcoded, but since adding a hook is not a public API, it should be fine and I thought it was better to start off with really simple code.
* Add git__compare_and_swap and use itRussell Belfer2013-04-221-8/+0
| | | | | | | This removes the lock from the repository object and changes the internals to use the new atomic git__compare_and_swap to update the _odb, _config, _index, and _refdb variables in a threadsafe manner.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* unload dll / destroy hash ctxs at shutdownEdward Thomson2012-11-131-0/+2
|
* move hash library func ptrs to global globalEdward Thomson2012-11-131-5/+6
|
* Win32 CryptoAPI and CNG support for SHA1Edward Thomson2012-11-131-0/+6
|
* Make the memory-window conrol structures globalCarlos Martín Nieto2012-08-201-2/+2
| | | | | | | | | | | | | Up to now, the idea was that the user would do all the operations for one repository in the same thread. Thus we could have the memory-mapped window information thread-local and avoid any locking. This is not practical in a few environments, such as Apple's GCD which allocates threads arbitrarily or the .NET CLR, where the OS-level thread can change at any moment. Make the control structure global and protect it with a mutex so we don't depend on the thread currently executing the code.
* Remove old error handling codeMichael Schubert2012-07-171-4/+0
|
* error-handling: ReferencesVicent Martí2012-03-061-0/+3
| | | | | Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* threads: Fix the shared global state with TLSVicent Marti2011-11-161-0/+24
See `global.c` for a description of what we're doing. When libgit2 is built with GIT_THREADS support, the threading system must be explicitly initialized with `git_threads_init()`.