Issue #477 - Clean up

This commit is contained in:
Justin Ethier 2021-08-12 23:01:04 -04:00
parent 4ff0bca100
commit d2915abe6a
3 changed files with 9 additions and 3 deletions

View file

@ -195,9 +195,15 @@ mstreams.o : mstreams.c $(HEADERS)
-DCYC_HAVE_FMEMOPEN=$(CYC_PLATFORM_HAS_FMEMOPEN) \
$< -o $@
ifdef CYC_PTHREAD_SET_STACK_SIZE
DEF_PTHREAD_SET_STACK_SIZE=-DCYC_PTHREAD_SET_STACK_SIZE=$(CYC_PTHREAD_SET_STACK_SIZE)
else
DEF_PTHREAD_SET_STACK_SIZE=
endif
runtime.o : runtime.c $(HEADERS)
$(CCOMP) -c \
-DCYC_PTHREAD_SET_STACK_SIZE=$(CYC_PTHREAD_SET_STACK_SIZE) \
$(DEF_PTHREAD_SET_STACK_SIZE) \
-DCYC_INSTALL_DIR=\"$(PREFIX)\" \
-DCYC_INSTALL_LIB=\"$(LIBDIR)\" \
-DCYC_INSTALL_BIN=\"$(BINDIR)\" \

View file

@ -16,7 +16,7 @@ CYC_GCC_OPT_FLAGS ?= -O2
# Change this to 1 to use a custom stack size for threads.
# Required on platforms such as Alpine Linux that use a
# very small stack by default.
CYC_PTHREAD_SET_STACK_SIZE ?= 0
CYC_PTHREAD_SET_STACK_SIZE ?=
OS = $(shell uname)
CC ?= cc

View file

@ -6826,7 +6826,7 @@ object Cyc_spawn_thread(object thread_and_thunk)
pthread_t thread;
pthread_attr_t attr;
pthread_attr_init(&attr);
#if CYC_PTHREAD_SET_STACK_SIZE
#ifdef CYC_PTHREAD_SET_STACK_SIZE
pthread_attr_setstacksize(&attr, 1024*1024*8);
#endif
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);