mirror of
https://github.com/janet-lang/janet
synced 2024-11-16 05:34:48 +00:00
Use JANET_SINGLE_THREADED to disable threads.
This commit is contained in:
parent
5b9eda5e87
commit
aa7f3411f5
2
Makefile
2
Makefile
@ -27,7 +27,7 @@ PREFIX?=/usr/local
|
|||||||
INCLUDEDIR?=$(PREFIX)/include
|
INCLUDEDIR?=$(PREFIX)/include
|
||||||
BINDIR?=$(PREFIX)/bin
|
BINDIR?=$(PREFIX)/bin
|
||||||
LIBDIR?=$(PREFIX)/lib
|
LIBDIR?=$(PREFIX)/lib
|
||||||
JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1)\""
|
JANET_BUILD?="\"$(shell git log --pretty=format:'%h' -n 1 || 'local')\""
|
||||||
CLIBS=-lm -lpthread
|
CLIBS=-lm -lpthread
|
||||||
JANET_TARGET=build/janet
|
JANET_TARGET=build/janet
|
||||||
JANET_LIBRARY=build/libjanet.so
|
JANET_LIBRARY=build/libjanet.so
|
||||||
|
@ -112,8 +112,10 @@ extern "C" {
|
|||||||
#define JANET_THREAD_LOCAL
|
#define JANET_THREAD_LOCAL
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define JANET_THREAD_LOCAL __thread
|
#define JANET_THREAD_LOCAL __thread
|
||||||
|
#define JANET_THREADS
|
||||||
#elif defined(_MSC_BUILD)
|
#elif defined(_MSC_BUILD)
|
||||||
#define JANET_THREAD_LOCAL __declspec(thread)
|
#define JANET_THREAD_LOCAL __declspec(thread)
|
||||||
|
#define JANET_THREADS
|
||||||
#else
|
#else
|
||||||
#define JANET_THREAD_LOCAL
|
#define JANET_THREAD_LOCAL
|
||||||
#endif
|
#endif
|
||||||
@ -143,11 +145,6 @@ extern "C" {
|
|||||||
#define JANET_INT_TYPES
|
#define JANET_INT_TYPES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable or disable threads */
|
|
||||||
#ifndef JANET_NO_THREADS
|
|
||||||
#define JANET_THREADS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* How to export symbols */
|
/* How to export symbols */
|
||||||
#ifndef JANET_API
|
#ifndef JANET_API
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
|
Loading…
Reference in New Issue
Block a user