summaryrefslogtreecommitdiff
path: root/src/mwindow.h
Commit message (Collapse)AuthorAgeFilesLines
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* git_mwindow_file_deregister() shouldn't return errorsScott J. Goldman2013-01-051-1/+1
| | | | | | | | | | | As a function that appears to only be called on error paths, I don't think it makes sense for it to return an error, or clobber the global giterr. Note that no existing callsites actually check the return code. In my own application, there are errors where the real error ends up being hidden, as git_mwindow_file_deregister() clobbers the global giterr. I'm not sure this error is even relevant?
* Make the memory-window conrol structures globalCarlos Martín Nieto2012-08-201-1/+0
| | | | | | | | | | | | | 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.
* mwindow: allow memory-window files to deregisterCarlos Martin Nieto2012-06-281-0/+1
| | | | | | | | | Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list.
* Continue error conversionRussell Belfer2012-03-141-3/+3
| | | | | | | This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
* 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-3/+0
| | | | | | | 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()`.
* Cleanup legal dataVicent Marti2011-09-191-21/+3
| | | | | | | | | | 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.
* Fix compilation in WindowsVicent Marti2011-08-081-4/+4
|
* Make packfile_unpack_header more genericCarlos Martín Nieto2011-08-021-1/+3
| | | | | | On the way, store the fd and the size in the mwindow file. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Factor out the mmap window codeCarlos Martín Nieto2011-08-021-0/+64
This code is useful for more things than just the packfile handling code. Factor it out so it can be reused. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>