On 10/22/2018 7:05 PM, Junio C Hamano wrote:
Jeff King <p...@peff.net> writes:

If nobody uses it, should we drop the return value, too? Like:

Yup.


I'm good with that.

At one point I also had the additional #ifndef NO_PTHREADS lines but it was starting to get messy with the threaded vs non-threaded code paths so I removed them. I'm fine with which ever people find more readable.

It does make me wonder if there are still platforms taking new build of git that don't support threads. Do we still need to write/test/debug/read through the single threaded code paths?

Is the diff Peff sent enough or do you want me to send another iteration on the patch?

Thanks,

Ben


diff --git a/read-cache.c b/read-cache.c
index 78c9516eb7..4b44a2eae5 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -2052,12 +2052,11 @@ static void *load_cache_entries_thread(void *_data)
        return NULL;
  }
-static unsigned long load_cache_entries_threaded(struct index_state *istate, const char *mmap, size_t mmap_size,
-                                                int nr_threads, struct 
index_entry_offset_table *ieot)
+static void load_cache_entries_threaded(struct index_state *istate, const char 
*mmap, size_t mmap_size,
+                                       int nr_threads, struct 
index_entry_offset_table *ieot)
  {
        int i, offset, ieot_blocks, ieot_start, err;
        struct load_cache_entries_thread_data *data;
-       unsigned long consumed = 0;
/* a little sanity checking */
        if (istate->name_hash_initialized)
@@ -2115,12 +2114,9 @@ static unsigned long load_cache_entries_threaded(struct 
index_state *istate, con
                if (err)
                        die(_("unable to join load_cache_entries thread: %s"), 
strerror(err));
                mem_pool_combine(istate->ce_mem_pool, p->ce_mem_pool);
-               consumed += p->consumed;
        }
free(data);
-
-       return consumed;
  }
  #endif
-Peff

Reply via email to