Commit 2089873e authored by Michael Graff's avatar Michael Graff
Browse files

set stack size (if < 64k) when starting a thread

parent d62314ba
......@@ -37,7 +37,7 @@ UNIXOBJS = @ISC_ISCIPV6_O@ \
NLSOBJS = nls/msgcat.@O@
PTHREADOBJS = pthreads/condition.@O@
PTHREADOBJS = pthreads/condition.@O@ pthreads/thread.@O@
WIN32OBJS = win32/condition.@O@ win32/dir.@O@ win32/once.@O@ \
win32/stdtime.@O@ win32/thread.@O@ win32/time.@O@
......
......@@ -26,9 +26,9 @@ CINCLUDES = -I${srcdir}/include \
CDEFINES =
CWARNINGS =
OBJS = condition.@O@
OBJS = condition.@O@ thread.@O@
SRCS = condition.c
SRCS = condition.c thread.c
SUBDIRS = include
TARGETS = ${OBJS}
......
......@@ -30,11 +30,14 @@ typedef void * isc_threadresult_t;
typedef void * isc_threadarg_t;
typedef isc_threadresult_t (*isc_threadfunc_t)(isc_threadarg_t);
isc_result_t
isc_thread_create(isc_threadfunc_t, isc_threadarg_t, isc_thread_t *);
/* XXX We could do fancier error handling... */
#define isc_thread_create(s, a, tp) \
((pthread_create((tp), NULL, (s), (a)) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#ifndef ISC_THREAD_MINSTACKSIZE
#define ISC_THREAD_MINSTACKSIZE (64 * 1024)
#endif
#define isc_thread_join(t, rp) \
((pthread_join((t), (rp)) == 0) ? \
......
......@@ -671,6 +671,7 @@
./lib/isc/pthreads/.cvsignore X 1999,2000
./lib/isc/pthreads/Makefile.in MAKE 1998,1999,2000
./lib/isc/pthreads/condition.c C 1998,1999,2000
./lib/isc/pthreads/thread.c C 2000
./lib/isc/pthreads/include/.cvsignore X 1999,2000
./lib/isc/pthreads/include/Makefile.in MAKE 1998,1999,2000
./lib/isc/pthreads/include/isc/.cvsignore X 1999,2000
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment