{"thread":{"id":"22446","subject":"[PATCH] Make NO_PTHREADS the sole thread configuration variable","startedAt":"2010-01-30T01:22:19Z","lastAt":"2010-01-31T19:52:21Z","messageCount":5,"participants":["Dan McGee","Junio C Hamano","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133060","messageId":"1264814539-27209-1-git-send-email-dpmcgee@gmail.com","threadId":"22446","inReplyTo":null,"subject":"[PATCH] Make NO_PTHREADS the sole thread configuration variable","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2010-01-30T01:22:19Z","receivedAt":"2010-01-30T01:22:19Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"When the first piece of threaded code was introduced in commit 8ecce684, it\ncame with its own THREADED_DELTA_SEARCH Makefile option. Since this time,\nmore threaded code has come into the codebase and a NO_PTHREADS option has\nalso been added. Get rid of the original option as the newer, more generic\noption covers everything we need.\n\nSigned-off-by: Dan McGee <dpmcgee@gmail.com>\n---\nFrom looking over the way we use these two variables, it doesn't appear we\nhave any cases where the two of these were out of sync. If I missed\nsomething, feel free to let me know. I did see some recent discussion\nregarding msys and threaded-grep, but that didn't come into play here. It\ndid make me shudder seeing yet another THREADED_* option get suggested,\nhowever.\n\n-Dan\n\n Makefile               |   24 ++----------------------\n builtin-pack-objects.c |   12 ++++++------\n configure.ac           |    9 ++-------\n 3 files changed, 10 insertions(+), 35 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex af08c8f..83383c3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -180,9 +180,6 @@ all::\n # If not set it defaults to the bare 'wish'. If it is set to the empty\n # string then NO_TCLTK will be forced (this is used by configure script).\n #\n-# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit\n-# parallel delta searching when packing objects.\n-#\n # Define INTERNAL_QSORT to use Git's implementation of qsort(), which\n # is a simplified version of the merge sort used in glibc. This is\n # recommended if Git triggers O(n^2) behavior in your platform's qsort().\n@@ -722,12 +719,10 @@ EXTLIBS =\n ifeq ($(uname_S),Linux)\n \tNO_STRLCPY = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),GNU/kFreeBSD)\n \tNO_STRLCPY = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),UnixWare)\n \tCC = cc\n@@ -781,7 +776,6 @@ ifeq ($(uname_S),Darwin)\n \t\tNO_STRLCPY = YesPlease\n \tendif\n \tNO_MEMMEM = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n endif\n ifeq ($(uname_S),SunOS)\n@@ -794,7 +788,6 @@ ifeq ($(uname_S),SunOS)\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n \tNO_REGEX = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tifeq ($(uname_R),5.7)\n \t\tNEEDS_RESOLV = YesPlease\n \t\tNO_IPV6 = YesPlease\n@@ -850,7 +843,6 @@ ifeq ($(uname_S),FreeBSD)\n \tBASIC_LDFLAGS += -L/usr/local/lib\n \tDIR_HAS_BSD_GROUP_SEMANTICS = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tifeq ($(shell expr \"$(uname_R)\" : '4\\.'),2)\n \t\tPTHREAD_LIBS = -pthread\n \t\tNO_UINTMAX_T = YesPlease\n@@ -864,7 +856,6 @@ ifeq ($(uname_S),OpenBSD)\n \tNEEDS_LIBICONV = YesPlease\n \tBASIC_CFLAGS += -I/usr/local/include\n \tBASIC_LDFLAGS += -L/usr/local/lib\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),NetBSD)\n \tifeq ($(shell expr \"$(uname_R)\" : '[01]\\.'),2)\n@@ -872,7 +863,6 @@ ifeq ($(uname_S),NetBSD)\n \tendif\n \tBASIC_CFLAGS += -I/usr/pkg/include\n \tBASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n \tNO_MKSTEMPS = YesPlease\n endif\n@@ -887,9 +877,7 @@ ifeq ($(uname_S),AIX)\n \tINTERNAL_QSORT = UnfortunatelyYes\n \tNEEDS_LIBICONV=YesPlease\n \tBASIC_CFLAGS += -D_LARGE_FILES\n-\tifneq ($(shell expr \"$(uname_V)\" : '[1234]'),1)\n-\t\tTHREADED_DELTA_SEARCH = YesPlease\n-\telse\n+\tifeq ($(shell expr \"$(uname_V)\" : '[1234]'),1)\n \t\tNO_PTHREADS = YesPlease\n \tendif\n endif\n@@ -915,7 +903,6 @@ ifeq ($(uname_S),IRIX)\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tSHELL_PATH = /usr/gnu/bin/bash\n \tNEEDS_LIBGEN = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),IRIX64)\n \tNO_SETENV=YesPlease\n@@ -934,7 +921,6 @@ ifeq ($(uname_S),IRIX64)\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tSHELL_PATH=/usr/gnu/bin/bash\n \tNEEDS_LIBGEN = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),HP-UX)\n \tNO_IPV6=YesPlease\n@@ -984,7 +970,6 @@ ifeq ($(uname_S),Windows)\n \tNO_CURL = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n@@ -1036,7 +1021,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_REGEX = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n@@ -1334,16 +1318,12 @@ ifdef RUNTIME_PREFIX\n endif\n \n ifdef NO_PTHREADS\n-\tTHREADED_DELTA_SEARCH =\n \tBASIC_CFLAGS += -DNO_PTHREADS\n else\n \tEXTLIBS += $(PTHREAD_LIBS)\n-endif\n-\n-ifdef THREADED_DELTA_SEARCH\n-\tBASIC_CFLAGS += -DTHREADED_DELTA_SEARCH\n \tLIB_OBJS += thread-utils.o\n endif\n+\n ifdef DIR_HAS_BSD_GROUP_SEMANTICS\n \tCOMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS\n endif\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex b0887d7..4a41547 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -17,7 +17,7 @@\n #include \"progress.h\"\n #include \"refs.h\"\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n #include \"thread-utils.h\"\n #include <pthread.h>\n #endif\n@@ -1255,7 +1255,7 @@ static int delta_cacheable(unsigned long src_size, unsigned long trg_size,\n \treturn 0;\n }\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n \n static pthread_mutex_t read_mutex;\n #define read_lock()\t\tpthread_mutex_lock(&read_mutex)\n@@ -1380,7 +1380,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,\n \t/*\n \t * Handle memory allocation outside of the cache\n \t * accounting lock.  Compiler will optimize the strangeness\n-\t * away when THREADED_DELTA_SEARCH is not defined.\n+\t * away when NO_PTHREADS is defined.\n \t */\n \tfree(trg_entry->delta_data);\n \tcache_lock();\n@@ -1567,7 +1567,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,\n \tfree(array);\n }\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n \n /*\n  * The main thread waits on the condition that (at least) one of the workers\n@@ -1899,7 +1899,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)\n \t\tif (delta_search_threads < 0)\n \t\t\tdie(\"invalid number of threads specified (%d)\",\n \t\t\t    delta_search_threads);\n-#ifndef THREADED_DELTA_SEARCH\n+#ifdef NO_PTHREADS\n \t\tif (delta_search_threads != 1)\n \t\t\twarning(\"no threads support, ignoring %s\", k);\n #endif\n@@ -2227,7 +2227,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)\n \t\t\tdelta_search_threads = strtoul(arg+10, &end, 0);\n \t\t\tif (!arg[10] || *end || delta_search_threads < 0)\n \t\t\t\tusage(pack_usage);\n-#ifndef THREADED_DELTA_SEARCH\n+#ifdef NO_PTHREADS\n \t\t\tif (delta_search_threads != 1)\n \t\t\t\twarning(\"no threads support, \"\n \t\t\t\t\t\"ignoring %s\", arg);\ndiff --git a/configure.ac b/configure.ac\nindex 78345eb..229140e 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -762,10 +762,9 @@ AC_SUBST(NO_MKSTEMPS)\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n-# Define NO_PTHREADS if we do not have pthreads\n+# Define NO_PTHREADS if we do not have pthreads.\n #\n-# Define PTHREAD_LIBS to the linker flag used for Pthread support and define\n-# THREADED_DELTA_SEARCH if Pthreads are available.\n+# Define PTHREAD_LIBS to the linker flag used for Pthread support.\n AC_DEFUN([PTHREADTEST_SRC], [\n #include <pthread.h>\n \n@@ -782,7 +781,6 @@ dnl   [[pthread_mutex_t test_mutex;]]\n dnl )])\n \n NO_PTHREADS=UnfortunatelyYes\n-THREADED_DELTA_SEARCH=\n PTHREAD_LIBS=\n \n if test -n \"$USER_NOPTHREAD\"; then\n@@ -798,7 +796,6 @@ elif test -z \"$PTHREAD_CFLAGS\"; then\n \t[AC_MSG_RESULT([yes])\n \t\tNO_PTHREADS=\n \t\tPTHREAD_LIBS=\"$opt\"\n-\t\tTHREADED_DELTA_SEARCH=YesPlease\n \t\tbreak\n \t],\n \t[AC_MSG_RESULT([no])])\n@@ -812,7 +809,6 @@ else\n \t[AC_MSG_RESULT([yes])\n \t\tNO_PTHREADS=\n \t\tPTHREAD_LIBS=\"$PTHREAD_CFLAGS\"\n-\t\tTHREADED_DELTA_SEARCH=YesPlease\n \t],\n \t[AC_MSG_RESULT([no])])\n \n@@ -823,7 +819,6 @@ CFLAGS=\"$old_CFLAGS\"\n \n AC_SUBST(PTHREAD_LIBS)\n AC_SUBST(NO_PTHREADS)\n-AC_SUBST(THREADED_DELTA_SEARCH)\n \n ## Output files\n AC_CONFIG_FILES([\"${config_file}\":\"${config_in}\":\"${config_append}\"])\n-- \n1.6.6.1\n"},{"id":"133127","messageId":"7vwryzqyjb.fsf@alter.siamese.dyndns.org","threadId":"22446","inReplyTo":"1264814539-27209-1-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] Make NO_PTHREADS the sole thread configuration variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-30T17:43:04Z","receivedAt":"2010-01-30T17:43:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan McGee <dpmcgee@gmail.com> writes:\n\n> When the first piece of threaded code was introduced in commit 8ecce684, it\n> came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,\n> more threaded code has come into the codebase and a NO_PTHREADS option has\n> also been added. Get rid of the original option as the newer, more generic\n> option covers everything we need.\n\nThe patch is a good change but only in the \"if it were like this from day\none, things would have been much simpler\" sense.  It is a breakage to\nexisting users with customized THREADED_DELTA_SEARCH in their config.mak\nfiles, isn't it?\n\nIf we take only the part of your patch that applies to Makefile, but\nexclude the first hunk (description of THREADED_DELTA_SEARCH) and the last\nhunk (the necessary part to keep THREADED_DELTA_SEARCH working), and\ninstead add something like:\n\n\tifndef NO_PTHREADS\n        \tTHREADED_DELTA_SEARCH = YesPlease\n\tendif\n\nimmediately before we include config.mak, would that be a workable\nsolution to:\n\n (1) keep existing users happy;\n\n (2) remove the redundant logic to compute the default for two Make\n     variables; and\n\n (3) keep control over use of threading in general _and_ use of\n     threading in delta computation?\n"},{"id":"133164","messageId":"alpine.LFD.2.00.1001302015120.1681@xanadu.home","threadId":"22446","inReplyTo":"7vwryzqyjb.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Make NO_PTHREADS the sole thread configuration variable","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-31T01:29:28Z","receivedAt":"2010-01-31T01:29:28Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 30 Jan 2010, Junio C Hamano wrote:\n\n> Dan McGee <dpmcgee@gmail.com> writes:\n> \n> > When the first piece of threaded code was introduced in commit 8ecce684, it\n> > came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,\n> > more threaded code has come into the codebase and a NO_PTHREADS option has\n> > also been added. Get rid of the original option as the newer, more generic\n> > option covers everything we need.\n> \n> The patch is a good change but only in the \"if it were like this from day\n> one, things would have been much simpler\" sense.  It is a breakage to\n> existing users with customized THREADED_DELTA_SEARCH in their config.mak\n> files, isn't it?\n\nI think that the release of v1.7.0 is the perfect match for such a \n\"breakage\".  Unlike for the dashless move, I really doubt the majority \nof Git users are using a customized THREADED_DELTA_SEARCH in a \nconfig.mak if they do build Git themselves at all.  So very few people \nare likely to be inconvenienced, and yet the inconvenience can hardly be \nqualified as a breakage since nothing will stop working in any case.\n\n> If we take only the part of your patch that applies to Makefile, but\n> exclude the first hunk (description of THREADED_DELTA_SEARCH) and the last\n> hunk (the necessary part to keep THREADED_DELTA_SEARCH working), and\n> instead add something like:\n> \n> \tifndef NO_PTHREADS\n>         \tTHREADED_DELTA_SEARCH = YesPlease\n> \tendif\n> \n> immediately before we include config.mak, would that be a workable\n> solution to:\n> \n>  (1) keep existing users happy;\n> \n>  (2) remove the redundant logic to compute the default for two Make\n>      variables; and\n> \n>  (3) keep control over use of threading in general _and_ use of\n>      threading in delta computation?\n\nIMHO I wouldn't bother that much.  Simply mentioning in the 1.7.0 \nrelease notes that THREADED_DELTA_SEARCH is no more should be fine.  \nLike I said, the existing users who might be affected are certainly few, \nand the impact on them is rather trivial.\n\n\nNicolas\n"},{"id":"133165","messageId":"449c10961001301801u46652804n507fe8a479ce66ce@mail.gmail.com","threadId":"22446","inReplyTo":"alpine.LFD.2.00.1001302015120.1681@xanadu.home","subject":"Re: [PATCH] Make NO_PTHREADS the sole thread configuration variable","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2010-01-31T02:01:02Z","receivedAt":"2010-01-31T02:01:02Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"On Sat, Jan 30, 2010 at 7:29 PM, Nicolas Pitre <nico@fluxnic.net> wrote:\n> On Sat, 30 Jan 2010, Junio C Hamano wrote:\n>\n>> Dan McGee <dpmcgee@gmail.com> writes:\n>>\n>> > When the first piece of threaded code was introduced in commit 8ecce684, it\n>> > came with its own THREADED_DELTA_SEARCH Makefile option. Since this time,\n>> > more threaded code has come into the codebase and a NO_PTHREADS option has\n>> > also been added. Get rid of the original option as the newer, more generic\n>> > option covers everything we need.\n>>\n>> The patch is a good change but only in the \"if it were like this from day\n>> one, things would have been much simpler\" sense.  It is a breakage to\n>> existing users with customized THREADED_DELTA_SEARCH in their config.mak\n>> files, isn't it?\n>\n> I think that the release of v1.7.0 is the perfect match for such a\n> \"breakage\".  Unlike for the dashless move, I really doubt the majority\n> of Git users are using a customized THREADED_DELTA_SEARCH in a\n> config.mak if they do build Git themselves at all.  So very few people\n> are likely to be inconvenienced, and yet the inconvenience can hardly be\n> qualified as a breakage since nothing will stop working in any case.\n>\n>> If we take only the part of your patch that applies to Makefile, but\n>> exclude the first hunk (description of THREADED_DELTA_SEARCH) and the last\n>> hunk (the necessary part to keep THREADED_DELTA_SEARCH working), and\n>> instead add something like:\n>>\n>>       ifndef NO_PTHREADS\n>>               THREADED_DELTA_SEARCH = YesPlease\n>>       endif\n>>\n>> immediately before we include config.mak, would that be a workable\n>> solution to:\n>>\n>>  (1) keep existing users happy;\n>>\n>>  (2) remove the redundant logic to compute the default for two Make\n>>      variables; and\n>>\n>>  (3) keep control over use of threading in general _and_ use of\n>>      threading in delta computation?\n>\n> IMHO I wouldn't bother that much.  Simply mentioning in the 1.7.0\n> release notes that THREADED_DELTA_SEARCH is no more should be fine.\n> Like I said, the existing users who might be affected are certainly few,\n> and the impact on them is rather trivial.\n\nThis is everything I wanted to say as well. I just don't think this is\nthat big of a deal to \"break compatibility\" as I can think of no\nreason why you would only want 2/3 of the pthreads code enabled (your\npoint 3). What this does do is set the precedent for any future\nthreads code to only use NO_PTHREADS and not introduce yet another\npreprocessor define.\n\nIf this gets applied, it needs a small correction- I can resubmit, but\nthe only difference is this:\n\ndiff --git a/config.mak.in b/config.mak.in\nindex 67b12f7..6008ac9 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -56,5 +56,4 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@\n SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@\n NO_PTHREADS=@NO_PTHREADS@\n-THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@\n PTHREAD_LIBS=@PTHREAD_LIBS@\n\n\n-Dan\n"},{"id":"133195","messageId":"7vsk9mcaru.fsf@alter.siamese.dyndns.org","threadId":"22446","inReplyTo":"alpine.LFD.2.00.1001302015120.1681@xanadu.home","subject":"Re: [PATCH] Make NO_PTHREADS the sole thread configuration variable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-31T19:52:21Z","receivedAt":"2010-01-31T19:52:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@fluxnic.net> writes:\n\n> Simply mentioning in the 1.7.0 \n> release notes that THREADED_DELTA_SEARCH is no more should be fine.  \n\nOk; here is what I'll queue.\n\nThanks, both.\n\n-- >8 --\nFrom: Dan McGee <dpmcgee@gmail.com>\nDate: Fri, 29 Jan 2010 19:22:19 -0600\nSubject: [PATCH] Make NO_PTHREADS the sole thread configuration variable\n\nWhen the first piece of threaded code was introduced in commit 8ecce684, it\ncame with its own THREADED_DELTA_SEARCH Makefile option. Since this time,\nmore threaded code has come into the codebase and a NO_PTHREADS option has\nalso been added. Get rid of the original option as the newer, more generic\noption covers everything we need.\n\nSigned-off-by: Dan McGee <dpmcgee@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/RelNotes-1.7.0.txt |    3 +++\n Makefile                         |   24 ++----------------------\n builtin-pack-objects.c           |   12 ++++++------\n config.mak.in                    |    1 -\n configure.ac                     |    9 ++-------\n 5 files changed, 13 insertions(+), 36 deletions(-)\n\ndiff --git a/Documentation/RelNotes-1.7.0.txt b/Documentation/RelNotes-1.7.0.txt\nindex 997b026..45ac906 100644\n--- a/Documentation/RelNotes-1.7.0.txt\n+++ b/Documentation/RelNotes-1.7.0.txt\n@@ -175,6 +175,9 @@ Updates since v1.6.6\n \n  * Many more commands are now built-in.\n \n+ * THREADED_DELTA_SEARCH is no more.  If you build with threads, delta\n+   compression will always take advantage of it.\n+\n Fixes since v1.6.6\n ------------------\n \ndiff --git a/Makefile b/Makefile\nindex af08c8f..83383c3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -180,9 +180,6 @@ all::\n # If not set it defaults to the bare 'wish'. If it is set to the empty\n # string then NO_TCLTK will be forced (this is used by configure script).\n #\n-# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit\n-# parallel delta searching when packing objects.\n-#\n # Define INTERNAL_QSORT to use Git's implementation of qsort(), which\n # is a simplified version of the merge sort used in glibc. This is\n # recommended if Git triggers O(n^2) behavior in your platform's qsort().\n@@ -722,12 +719,10 @@ EXTLIBS =\n ifeq ($(uname_S),Linux)\n \tNO_STRLCPY = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),GNU/kFreeBSD)\n \tNO_STRLCPY = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),UnixWare)\n \tCC = cc\n@@ -781,7 +776,6 @@ ifeq ($(uname_S),Darwin)\n \t\tNO_STRLCPY = YesPlease\n \tendif\n \tNO_MEMMEM = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n endif\n ifeq ($(uname_S),SunOS)\n@@ -794,7 +788,6 @@ ifeq ($(uname_S),SunOS)\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n \tNO_REGEX = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tifeq ($(uname_R),5.7)\n \t\tNEEDS_RESOLV = YesPlease\n \t\tNO_IPV6 = YesPlease\n@@ -850,7 +843,6 @@ ifeq ($(uname_S),FreeBSD)\n \tBASIC_LDFLAGS += -L/usr/local/lib\n \tDIR_HAS_BSD_GROUP_SEMANTICS = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tifeq ($(shell expr \"$(uname_R)\" : '4\\.'),2)\n \t\tPTHREAD_LIBS = -pthread\n \t\tNO_UINTMAX_T = YesPlease\n@@ -864,7 +856,6 @@ ifeq ($(uname_S),OpenBSD)\n \tNEEDS_LIBICONV = YesPlease\n \tBASIC_CFLAGS += -I/usr/local/include\n \tBASIC_LDFLAGS += -L/usr/local/lib\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),NetBSD)\n \tifeq ($(shell expr \"$(uname_R)\" : '[01]\\.'),2)\n@@ -872,7 +863,6 @@ ifeq ($(uname_S),NetBSD)\n \tendif\n \tBASIC_CFLAGS += -I/usr/pkg/include\n \tBASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tUSE_ST_TIMESPEC = YesPlease\n \tNO_MKSTEMPS = YesPlease\n endif\n@@ -887,9 +877,7 @@ ifeq ($(uname_S),AIX)\n \tINTERNAL_QSORT = UnfortunatelyYes\n \tNEEDS_LIBICONV=YesPlease\n \tBASIC_CFLAGS += -D_LARGE_FILES\n-\tifneq ($(shell expr \"$(uname_V)\" : '[1234]'),1)\n-\t\tTHREADED_DELTA_SEARCH = YesPlease\n-\telse\n+\tifeq ($(shell expr \"$(uname_V)\" : '[1234]'),1)\n \t\tNO_PTHREADS = YesPlease\n \tendif\n endif\n@@ -915,7 +903,6 @@ ifeq ($(uname_S),IRIX)\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tSHELL_PATH = /usr/gnu/bin/bash\n \tNEEDS_LIBGEN = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),IRIX64)\n \tNO_SETENV=YesPlease\n@@ -934,7 +921,6 @@ ifeq ($(uname_S),IRIX64)\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tSHELL_PATH=/usr/gnu/bin/bash\n \tNEEDS_LIBGEN = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n endif\n ifeq ($(uname_S),HP-UX)\n \tNO_IPV6=YesPlease\n@@ -984,7 +970,6 @@ ifeq ($(uname_S),Windows)\n \tNO_CURL = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\n@@ -1036,7 +1021,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_REGEX = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n-\tTHREADED_DELTA_SEARCH = YesPlease\n \tCOMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n@@ -1334,16 +1318,12 @@ ifdef RUNTIME_PREFIX\n endif\n \n ifdef NO_PTHREADS\n-\tTHREADED_DELTA_SEARCH =\n \tBASIC_CFLAGS += -DNO_PTHREADS\n else\n \tEXTLIBS += $(PTHREAD_LIBS)\n-endif\n-\n-ifdef THREADED_DELTA_SEARCH\n-\tBASIC_CFLAGS += -DTHREADED_DELTA_SEARCH\n \tLIB_OBJS += thread-utils.o\n endif\n+\n ifdef DIR_HAS_BSD_GROUP_SEMANTICS\n \tCOMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS\n endif\ndiff --git a/builtin-pack-objects.c b/builtin-pack-objects.c\nindex b0887d7..4a41547 100644\n--- a/builtin-pack-objects.c\n+++ b/builtin-pack-objects.c\n@@ -17,7 +17,7 @@\n #include \"progress.h\"\n #include \"refs.h\"\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n #include \"thread-utils.h\"\n #include <pthread.h>\n #endif\n@@ -1255,7 +1255,7 @@ static int delta_cacheable(unsigned long src_size, unsigned long trg_size,\n \treturn 0;\n }\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n \n static pthread_mutex_t read_mutex;\n #define read_lock()\t\tpthread_mutex_lock(&read_mutex)\n@@ -1380,7 +1380,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,\n \t/*\n \t * Handle memory allocation outside of the cache\n \t * accounting lock.  Compiler will optimize the strangeness\n-\t * away when THREADED_DELTA_SEARCH is not defined.\n+\t * away when NO_PTHREADS is defined.\n \t */\n \tfree(trg_entry->delta_data);\n \tcache_lock();\n@@ -1567,7 +1567,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,\n \tfree(array);\n }\n \n-#ifdef THREADED_DELTA_SEARCH\n+#ifndef NO_PTHREADS\n \n /*\n  * The main thread waits on the condition that (at least) one of the workers\n@@ -1899,7 +1899,7 @@ static int git_pack_config(const char *k, const char *v, void *cb)\n \t\tif (delta_search_threads < 0)\n \t\t\tdie(\"invalid number of threads specified (%d)\",\n \t\t\t    delta_search_threads);\n-#ifndef THREADED_DELTA_SEARCH\n+#ifdef NO_PTHREADS\n \t\tif (delta_search_threads != 1)\n \t\t\twarning(\"no threads support, ignoring %s\", k);\n #endif\n@@ -2227,7 +2227,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)\n \t\t\tdelta_search_threads = strtoul(arg+10, &end, 0);\n \t\t\tif (!arg[10] || *end || delta_search_threads < 0)\n \t\t\t\tusage(pack_usage);\n-#ifndef THREADED_DELTA_SEARCH\n+#ifdef NO_PTHREADS\n \t\t\tif (delta_search_threads != 1)\n \t\t\t\twarning(\"no threads support, \"\n \t\t\t\t\t\"ignoring %s\", arg);\ndiff --git a/config.mak.in b/config.mak.in\nindex 67b12f7..6008ac9 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -56,5 +56,4 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@\n SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@\n NO_PTHREADS=@NO_PTHREADS@\n-THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@\n PTHREAD_LIBS=@PTHREAD_LIBS@\ndiff --git a/configure.ac b/configure.ac\nindex 78345eb..229140e 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -762,10 +762,9 @@ AC_SUBST(NO_MKSTEMPS)\n # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.\n # Enable it on Windows.  By default, symrefs are still used.\n #\n-# Define NO_PTHREADS if we do not have pthreads\n+# Define NO_PTHREADS if we do not have pthreads.\n #\n-# Define PTHREAD_LIBS to the linker flag used for Pthread support and define\n-# THREADED_DELTA_SEARCH if Pthreads are available.\n+# Define PTHREAD_LIBS to the linker flag used for Pthread support.\n AC_DEFUN([PTHREADTEST_SRC], [\n #include <pthread.h>\n \n@@ -782,7 +781,6 @@ dnl   [[pthread_mutex_t test_mutex;]]\n dnl )])\n \n NO_PTHREADS=UnfortunatelyYes\n-THREADED_DELTA_SEARCH=\n PTHREAD_LIBS=\n \n if test -n \"$USER_NOPTHREAD\"; then\n@@ -798,7 +796,6 @@ elif test -z \"$PTHREAD_CFLAGS\"; then\n \t[AC_MSG_RESULT([yes])\n \t\tNO_PTHREADS=\n \t\tPTHREAD_LIBS=\"$opt\"\n-\t\tTHREADED_DELTA_SEARCH=YesPlease\n \t\tbreak\n \t],\n \t[AC_MSG_RESULT([no])])\n@@ -812,7 +809,6 @@ else\n \t[AC_MSG_RESULT([yes])\n \t\tNO_PTHREADS=\n \t\tPTHREAD_LIBS=\"$PTHREAD_CFLAGS\"\n-\t\tTHREADED_DELTA_SEARCH=YesPlease\n \t],\n \t[AC_MSG_RESULT([no])])\n \n@@ -823,7 +819,6 @@ CFLAGS=\"$old_CFLAGS\"\n \n AC_SUBST(PTHREAD_LIBS)\n AC_SUBST(NO_PTHREADS)\n-AC_SUBST(THREADED_DELTA_SEARCH)\n \n ## Output files\n AC_CONFIG_FILES([\"${config_file}\":\"${config_in}\":\"${config_append}\"])\n-- \n1.7.0.rc1.141.gd3fd2\n"}]}