diff options
author | Russell Belfer <rb@github.com> | 2014-03-15 00:20:51 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-04-18 01:43:45 +0400 |
commit | 8a2834d34173220c56bd1898397c0e6d200f327d (patch) | |
tree | 62d91bb19bc017a7bb5eb829bf2e52f04581d98c /src/iterator.c | |
parent | 40ed499039f887ebcb0b5badf0157519148398b8 (diff) |
Index locking and entry allocation changes
This makes the lock management on the index a little bit broader,
having a number of routines hold the lock across looking up the
item to be modified and actually making the modification. Still
not true thread safety, but more pure index modifications are now
safe which allows the simple cases (such as starting up a diff
while index modifications are underway) safe enough to get the
snapshot without hitting allocation problems.
As part of this, I simplified the allocation of index entries to
use a flex array and just put the path at the end of the index
entry. This makes every entry self-contained and makes it a
little easier to feel sure that pointers to strings aren't
being accidentally copied and freed while other references are
still being held.
Diffstat (limited to 'src/iterator.c')
0 files changed, 0 insertions, 0 deletions