summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-10-24 14:59:10 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-10-24 14:59:10 -0700
commite4da4fbe0eea55c26f042f76df58bfc529b46ae0 (patch)
tree7ead155867beb400d6bed1d89be73803305f6d31 /builtin
parentMerge branch 'wk/t1304-wo-USER' (diff)
parentHandle atexit list internaly for unthreaded builds (diff)
downloadtgif-e4da4fbe0eea55c26f042f76df58bfc529b46ae0.tar.xz
Merge branch 'eb/no-pthreads'
Allow us build with NO_PTHREADS=NoThanks compilation option. * eb/no-pthreads: Handle atexit list internaly for unthreaded builds pack-objects: set number of threads before checking and warning index-pack: fix compilation with NO_PTHREADS
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c5
-rw-r--r--builtin/index-pack.c3
-rw-r--r--builtin/pack-objects.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 7f509d06a8..d5e7532105 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -391,7 +391,6 @@ static void clone_local(const char *src_repo, const char *dest_repo)
static const char *junk_work_tree;
static const char *junk_git_dir;
-static pid_t junk_pid;
static enum {
JUNK_LEAVE_NONE,
JUNK_LEAVE_REPO,
@@ -418,8 +417,6 @@ static void remove_junk(void)
break;
}
- if (getpid() != junk_pid)
- return;
if (junk_git_dir) {
strbuf_addstr(&sb, junk_git_dir);
remove_dir_recursively(&sb, 0);
@@ -760,8 +757,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
struct refspec *refspec;
const char *fetch_pattern;
- junk_pid = getpid();
-
packet_trace_identity("clone");
argc = parse_options(argc, argv, prefix, builtin_clone_options,
builtin_clone_usage, 0);
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 792c66ca59..a369f55353 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -185,6 +185,9 @@ static void cleanup_thread(void)
#define deepest_delta_lock()
#define deepest_delta_unlock()
+#define type_cas_lock()
+#define type_cas_unlock()
+
#endif
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index a4022a78d0..78c659a6b4 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1973,8 +1973,6 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
init_threaded_search();
- if (!delta_search_threads) /* --threads=0 means autodetect */
- delta_search_threads = online_cpus();
if (delta_search_threads <= 1) {
find_deltas(list, &list_size, window, depth, processed);
cleanup_threaded_search();
@@ -2686,6 +2684,10 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
pack_compression_level = Z_DEFAULT_COMPRESSION;
else if (pack_compression_level < 0 || pack_compression_level > Z_BEST_COMPRESSION)
die("bad pack compression level %d", pack_compression_level);
+
+ if (!delta_search_threads) /* --threads=0 means autodetect */
+ delta_search_threads = online_cpus();
+
#ifdef NO_PTHREADS
if (delta_search_threads != 1)
warning("no threads support, ignoring --threads");