diff options
author | Alex Vandiver <alexmv@dropbox.com> | 2018-01-02 19:04:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-04 15:06:42 -0800 |
commit | 15d54180b6eb96312c301116662d03c35a49d5e6 (patch) | |
tree | ade3dccecf05df689c5b7708bebb9fad05e59b52 | |
parent | 4c1d1266aba87d69c98a8f71038a9869c5ae0a71 (diff) | |
download | git-15d54180b6eb96312c301116662d03c35a49d5e6.tar.gz |
fsmonitor: stop inline'ing mark_fsmonitor_valid / _invalid
These were inline'd when they were first introduced, presumably as an
optimization for cases when they were called in tight loops. This
complicates using these functions, as untracked_cache_invalidate_path
is defined in dir.h.
Leave the inline'ing up to the compiler's decision, for ease of use.
Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | fsmonitor.c | 18 | ||||
-rw-r--r-- | fsmonitor.h | 17 |
2 files changed, 20 insertions, 15 deletions
diff --git a/fsmonitor.c b/fsmonitor.c index 0af7c4edba..df084235ba 100644 --- a/fsmonitor.c +++ b/fsmonitor.c @@ -194,6 +194,24 @@ void refresh_fsmonitor(struct index_state *istate) istate->fsmonitor_last_update = last_update; } +void mark_fsmonitor_valid(struct cache_entry *ce) +{ + if (core_fsmonitor) { + ce->ce_flags |= CE_FSMONITOR_VALID; + trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name); + } +} + +void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce) +{ + if (core_fsmonitor) { + ce->ce_flags &= ~CE_FSMONITOR_VALID; + untracked_cache_invalidate_path(istate, ce->name); + trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_invalid '%s'", ce->name); + } +} + + void add_fsmonitor(struct index_state *istate) { int i; diff --git a/fsmonitor.h b/fsmonitor.h index cd3cc0ccf2..6328745b23 100644 --- a/fsmonitor.h +++ b/fsmonitor.h @@ -46,13 +46,7 @@ extern void refresh_fsmonitor(struct index_state *istate); * called any time the cache entry has been updated to reflect the * current state of the file on disk. */ -static inline void mark_fsmonitor_valid(struct cache_entry *ce) -{ - if (core_fsmonitor) { - ce->ce_flags |= CE_FSMONITOR_VALID; - trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_clean '%s'", ce->name); - } -} +extern void mark_fsmonitor_valid(struct cache_entry *ce); /* * Clear the given cache entry's CE_FSMONITOR_VALID bit and invalidate @@ -61,13 +55,6 @@ static inline void mark_fsmonitor_valid(struct cache_entry *ce) * trigger an lstat() or invalidate the untracked cache for the * corresponding directory */ -static inline void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce) -{ - if (core_fsmonitor) { - ce->ce_flags &= ~CE_FSMONITOR_VALID; - untracked_cache_invalidate_path(istate, ce->name); - trace_printf_key(&trace_fsmonitor, "mark_fsmonitor_invalid '%s'", ce->name); - } -} +extern void mark_fsmonitor_invalid(struct index_state *istate, struct cache_entry *ce); #endif |