* A thread proc to run the load_cache_entries() computation * across multiple background threads. */
| 2095 | * across multiple background threads. |
| 2096 | */ |
| 2097 | static 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 | |
| 2111 | static 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) |
nothing calls this directly
no test coverage detected