diff options
author | Dan McGee <dpmcgee@gmail.com> | 2010-01-29 19:22:19 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-31 11:50:50 -0800 |
commit | 7eb151d6e289b98d2ad3d1a9ad08fe3693f05a24 (patch) | |
tree | 78b1390ba8ce18edc9440a494d50387a7dec7370 /builtin-pack-objects.c | |
parent | b0883aa6c77111e88496bd0afe073caf68ab9f99 (diff) | |
download | git-7eb151d6e289b98d2ad3d1a9ad08fe3693f05a24.tar.gz |
Make NO_PTHREADS the sole thread configuration variable
When the first piece of threaded code was introduced in commit 8ecce684, it
came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,
more threaded code has come into the codebase and a NO_PTHREADS option has
also been added. Get rid of the original option as the newer, more generic
option covers everything we need.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index b0887d759d..4a41547a27 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -17,7 +17,7 @@ #include "progress.h" #include "refs.h" -#ifdef THREADED_DELTA_SEARCH +#ifndef NO_PTHREADS #include "thread-utils.h" #include <pthread.h> #endif @@ -1255,7 +1255,7 @@ static int delta_cacheable(unsigned long src_size, unsigned long trg_size, return 0; } -#ifdef THREADED_DELTA_SEARCH +#ifndef NO_PTHREADS static pthread_mutex_t read_mutex; #define read_lock() pthread_mutex_lock(&read_mutex) @@ -1380,7 +1380,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, /* * Handle memory allocation outside of the cache * accounting lock. Compiler will optimize the strangeness - * away when THREADED_DELTA_SEARCH is not defined. + * away when NO_PTHREADS is defined. */ free(trg_entry->delta_data); cache_lock(); @@ -1567,7 +1567,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size, free(array); } -#ifdef THREADED_DELTA_SEARCH +#ifndef NO_PTHREADS /* * The main thread waits on the condition that (at least) one of the workers @@ -1899,7 +1899,7 @@ static int git_pack_config(const char *k, const char *v, void *cb) if (delta_search_threads < 0) die("invalid number of threads specified (%d)", delta_search_threads); -#ifndef THREADED_DELTA_SEARCH +#ifdef NO_PTHREADS if (delta_search_threads != 1) warning("no threads support, ignoring %s", k); #endif @@ -2227,7 +2227,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) delta_search_threads = strtoul(arg+10, &end, 0); if (!arg[10] || *end || delta_search_threads < 0) usage(pack_usage); -#ifndef THREADED_DELTA_SEARCH +#ifdef NO_PTHREADS if (delta_search_threads != 1) warning("no threads support, " "ignoring %s", arg); |