MCPcopy Create free account
hub / github.com/git/git / load_cache_entries_thread

Function load_cache_entries_thread

read-cache.c:2097–2109  ·  view source on GitHub ↗

* A thread proc to run the load_cache_entries() computation * across multiple background threads. */

Source from the content-addressed store, hash-verified

2095 * across multiple background threads.
2096 */
2097static void *load_cache_entries_thread(void *_data)
2098{
2099 struct load_cache_entries_thread_data *p = _data;
2100 int i;
2101
2102 /* iterate across all ieot blocks assigned to this thread */
2103 for (i = p->ieot_start; i < p->ieot_start + p->ieot_blocks; i++) {
2104 p->consumed += load_cache_entry_block(p->istate, p->ce_mem_pool,
2105 p->offset, p->ieot->entries[i].nr, p->mmap, p->ieot->entries[i].offset, NULL);
2106 p->offset += p->ieot->entries[i].nr;
2107 }
2108 return NULL;
2109}
2110
2111static unsigned long load_cache_entries_threaded(struct index_state *istate, const char *mmap, size_t mmap_size,
2112 int nr_threads, struct index_entry_offset_table *ieot)

Callers

nothing calls this directly

Calls 1

load_cache_entry_blockFunction · 0.85

Tested by

no test coverage detected