summaryrefslogtreecommitdiff
path: root/src/thread-utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix macro redefinition warningFallso2015-07-151-0/+2
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Tabify everythingVicent Marti2011-09-191-8/+8
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* Cleanup legal dataVicent Marti2011-09-191-0/+6
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* Wrap malloc and friends and report out of memory as GIT_ENOMEMShawn O. Pearce2008-12-301-0/+1
| | | | | | | | | | | | | | | | We now forbid direct use of malloc, strdup or calloc within the library and instead use wrapper functions git__malloc, etc. to invoke the underlying library malloc and set git_errno to a no memory error code if the allocation fails. In the future once we have pack objects in memory we are likely to enhance these routines with garbage collection logic to purge cached pack data when allocations fail. Because the size of the function will grow somewhat large, we don't want to mark them for inline as gcc tends to aggressively inline, creating larger than expected executables. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Add compiler/platform agnostic thread-local storageAndreas Ericsson2008-11-181-0/+48
It doesn't cover all cases, but we can work on those as we go along. For now, gcc, MSVC++, Intel C/C++, IBM XL C/C++, Sun Studio C/C++ and Borland C++ Builder are the supported compilers (although we boldly assume that they all are of a recent enough version to support thread-local storage). This is intended to be used in upcoming patches that implement graceful (but TLS-dependant) error-handling in the library. As an added bonus, we also bring the online_cpus() function from git.git to detect the number of usable cpu's. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>