Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
preload-index.c: remove #ifdef NO_PTHREADS
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 3 Nov 2018 08:48:45 +0000
(09:48 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 5 Nov 2018 04:42:11 +0000
(13:42 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
preload-index.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
fd6263f
)
diff --git
a/preload-index.c
b/preload-index.c
index 9e7152ab14d9359d0a48da8b25cd58253a13fc0c..0e24886aca9f052fec844859cdf84d6229f83137 100644
(file)
--- a/
preload-index.c
+++ b/
preload-index.c
@@
-7,17
+7,7
@@
#include "fsmonitor.h"
#include "config.h"
#include "progress.h"
#include "fsmonitor.h"
#include "config.h"
#include "progress.h"
-
-#ifdef NO_PTHREADS
-static void preload_index(struct index_state *index,
- const struct pathspec *pathspec,
- unsigned int refresh_flags)
-{
- ; /* nothing */
-}
-#else
-
-#include <pthread.h>
+#include "thread-utils.h"
/*
* Mostly randomly chosen maximum thread counts: we
/*
* Mostly randomly chosen maximum thread counts: we
@@
-108,7
+98,7
@@
static void preload_index(struct index_state *index,
struct thread_data data[MAX_PARALLEL];
struct progress_data pd;
struct thread_data data[MAX_PARALLEL];
struct progress_data pd;
- if (!core_preload_index)
+ if (!
HAVE_THREADS || !
core_preload_index)
return;
threads = index->cache_nr / THREAD_COST;
return;
threads = index->cache_nr / THREAD_COST;
@@
-151,7
+141,6
@@
static void preload_index(struct index_state *index,
trace_performance_leave("preload index");
}
trace_performance_leave("preload index");
}
-#endif
int read_index_preload(struct index_state *index,
const struct pathspec *pathspec,
int read_index_preload(struct index_state *index,
const struct pathspec *pathspec,