Commit Graph

22 Commits

Author SHA1 Message Date
Patrick Steinhardt
2aa5c6ff8a threads: remove unused function pthread_num_processors_np
The function pthread_num_processors_np is currently unused and superseded by the
function `git_online_cpus`. Remove the function.
2016-10-01 17:40:39 +02:00
Patrick Steinhardt
68343f26dd threads: split up OS-dependent rwlock code 2016-10-01 17:40:39 +02:00
Patrick Steinhardt
fabd477125 threads: split up OS-dependent thread-condition code 2016-10-01 17:40:39 +02:00
Patrick Steinhardt
1b8253168a threads: remove unused function pthread_cond_broadcast 2016-10-01 17:40:39 +02:00
Patrick Steinhardt
40b243bf5a threads: split up OS-dependent mutex code 2016-10-01 17:40:38 +02:00
Patrick Steinhardt
fc2b97dd4e threads: split up OS-dependent thread code 2016-10-01 17:40:38 +02:00
Philip Kelley
1b4e29b7f6 React to review feedback 2014-06-07 14:40:42 -04:00
Philip Kelley
fb5917679d Win32: Fix object::cache::threadmania test on x64 2014-06-07 12:51:48 -04:00
Russell Belfer
a3aa5f4d5d Add simple global shutdown hooks
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.
2013-09-17 09:31:45 -07:00
Russell Belfer
f087bc245e Convert to our own SRWLOCK type on Win32 2013-08-27 12:08:55 -07:00
Russell Belfer
2f368a661c Fix MINGW SRWLock typedefs 2013-08-26 15:17:35 -07:00
Russell Belfer
430953417f Load SRWLock APIs at runtime
This loads SRWLock APIs at runtime and in their absence (i.e. on
Windows before Vista) falls back on a regular CRITICAL_SECTION
that will not permit concurrent readers.
2013-08-26 14:56:31 -07:00
Russell Belfer
b6ac07b517 Trying to fix Win32 warnings 2013-08-22 14:45:10 -07:00
Russell Belfer
972bb689c4 Add SRWLock implementation of rwlocks for Win32 2013-08-22 14:10:56 -07:00
Russell Belfer
38eef6113d Make indexer use shared packfile open code
The indexer was creating a packfile object separately from the
code in pack.c which was a problem since I put a call to
git_mutex_init into just pack.c.  This commit updates the pack
function for creating a new pack object (i.e. git_packfile_check())
so that it can be used in both places and then makes indexer.c
use the shared initialization routine.

There are also a few minor formatting and warning message fixes.
2013-04-22 16:52:07 +02:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Philip Kelley
5e4f2b5faa Support pthread_cond_* on Win32 2012-10-16 13:18:45 -04:00
schu
5e0de32818 Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
2012-02-13 17:11:09 +01:00
Vicent Marti
87d9869fc3 Tabify everything
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.
2011-09-19 03:34:49 +03:00
Vicent Marti
bb742ede3d Cleanup legal data
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.
2011-09-19 01:54:32 +03:00
Vicent Marti
bb3de0c472 Thread safe cache 2011-03-20 21:45:06 +02:00
Vicent Marti
bbcc7ffc69 Add proper threading support to libgit2
We now depend on libpthread on all Unix platforms (should be installed
by default) and use a simple wrapper for Windows threads under Win32.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-15 21:14:07 +02:00