#include <stddef.h> /* size_t */
#include <stdlib.h> /* malloc, calloc, free */
-#ifdef ZSTD_PTHREAD
+#ifdef ZSTD_MULTITHREAD
#include <threading.h>
pthread_cond_signal(&ctx->queuePopCond);
}
-#else /* ZSTD_PTHREAD not defined */
+#else /* ZSTD_MULTITHREAD not defined */
/* No multi-threading support */
/* We don't need any data, but if it is empty malloc() might return NULL. */
function(opaque);
}
-#endif /* ZSTD_PTHREAD */
+#endif /* ZSTD_MULTITHREAD */
*/
/**
- * This file will hold wrapper for systems, which do not support Pthreads
+ * This file will hold wrapper for systems, which do not support pthreads
*/
-#if defined(ZSTD_PTHREAD) && defined(_WIN32)
+#if defined(ZSTD_MULTITHREAD) && defined(_WIN32)
/**
* Windows minimalist Pthread Wrapper, based on :
}
}
-#endif
+#endif /* ZSTD_MULTITHREAD */
extern "C" {
#endif
-#if defined(ZSTD_PTHREAD) && defined(_WIN32)
+#if defined(ZSTD_MULTITHREAD) && defined(_WIN32)
/**
* Windows minimalist Pthread Wrapper, based on :
*/
-#elif defined(ZSTD_PTHREAD) /* posix assumed ; need a better detection mathod */
+#elif defined(ZSTD_MULTITHREAD) /* posix assumed ; need a better detection mathod */
/* === POSIX Systems === */
# include <pthread.h>
-#else /* ZSTD_PTHREAD not defined */
+#else /* ZSTD_MULTITHREAD not defined */
/* No multithreading support */
#define pthread_mutex_t int /* #define rather than typedef, as sometimes pthread support is implicit, resulting in duplicated symbols */
/* do not use pthread_t */
-#endif /* ZSTD_PTHREAD */
+#endif /* ZSTD_MULTITHREAD */
#if defined (__cplusplus)
}
&& $(MAKE) zstd; \
fi
-zstdmt: CPPFLAGS += -DZSTD_PTHREAD
+zstdmt: CPPFLAGS += -DZSTD_MULTITHREAD
zstdmt: LDFLAGS += -lpthread
zstdmt: zstd
# Define *.exe as extension for Windows systems
ifneq (,$(filter Windows%,$(OS)))
EXT =.exe
-PTHREAD = -DZSTD_PTHREAD
+MULTITHREAD = -DZSTD_MULTITHREAD
else
EXT =
-PTHREAD = -pthread -DZSTD_PTHREAD
+MULTITHREAD = -pthread -DZSTD_MULTITHREAD
endif
VOID = /dev/null
$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@$(EXT)
zstreamtest : $(ZSTD_FILES) $(PRGDIR)/datagen.c zstreamtest.c
- $(CC) $(FLAGS) $^ -o $@$(EXT)
+ $(CC) $(FLAGS) $(MULTITHREAD) $^ -o $@$(EXT)
zstreamtest32 : $(ZSTD_FILES) $(PRGDIR)/datagen.c zstreamtest.c
- $(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
+ $(CC) -m32 $(FLAGS) $(MULTITHREAD) $^ -o $@$(EXT)
zstreamtest-dll : LDFLAGS+= -L$(ZSTDDIR) -lzstd
zstreamtest-dll : $(ZSTDDIR)/common/xxhash.c $(PRGDIR)/datagen.c zstreamtest.c
endif
pool : pool.c $(ZSTDDIR)/common/pool.c $(ZSTDDIR)/common/threading.c
- $(CC) $(FLAGS) $(PTHREAD) $^ -o $@$(EXT)
+ $(CC) $(FLAGS) $(MULTITHREAD) $^ -o $@$(EXT)
namespaceTest:
if $(CC) namespaceTest.c ../lib/common/xxhash.c -o $@ ; then echo compilation should fail; exit 1 ; fi