Re: [PATCH v2] Make xmalloc and xrealloc thread-safe
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Apr 7, 2010, 16:44 UTC
- Message-ID
- <n2n40aa078e1004070944sc137aef3yfc5967d517860192@mail.gmail.com>
- In-Reply-To
- <v2t4c8ef71004070913r2de3c8car31f39a2ab7aa6d15@mail.gmail.com>
On Wed, Apr 7, 2010 at 6:13 PM, Fredrik Kuivinen <frekui@gmail.com> wrote:
Show 15 quoted lines
> On Wed, Apr 7, 2010 at 17:08, Nicolas Pitre <nico@fluxnic.net> wrote: >> On Wed, 7 Apr 2010, Fredrik Kuivinen wrote: >>> diff --git a/thread-utils.c b/thread-utils.c >>> index 4f9c829..3c8d817 100644 >>> --- a/thread-utils.c >>> +++ b/thread-utils.c >>> @@ -1,4 +1,5 @@ >>> #include "cache.h" >>> +#include <pthread.h> >> >> This will fail compilation on Windows surely? > > I think it will work. We use "#include <pthread.h>" in builtin/grep.c, > builtin/pack-objects.c, and preload-index.c already. >
Still, isn't this REALLY the kind of stuff that usually goes in git-compat-util.h? I'm not asking you to change it, I'm just a bit puzzled that the other pthread-clients did it this way...
-- Erik "kusma" Faye-Lund