Enable threaded async procedures whenever pthreads is available

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Sixt
2010-03-09 21:00:36 +01:00
committed by Junio C Hamano
parent 0ea1c89ba6
commit f6b6098316
4 changed files with 10 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
#ifndef RUN_COMMAND_H
#define RUN_COMMAND_H
#ifdef ASYNC_AS_THREAD
#ifndef NO_PTHREADS
#include <pthread.h>
#endif
@@ -78,7 +78,7 @@ struct async {
void *data;
int in; /* caller writes here and closes it */
int out; /* caller reads from here and closes it */
#ifndef ASYNC_AS_THREAD
#ifdef NO_PTHREADS
pid_t pid;
#else
pthread_t tid;