diff options
author | marcel <marcel@FreeBSD.org> | 2003-09-19 23:28:13 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-09-19 23:28:13 +0000 |
commit | 265b2be119b5fdb39eee7541529f95fbb316f745 (patch) | |
tree | 95ce758d67e8ea12774d74710d23a00baeeebefe /lib | |
parent | accdfbd6265c14ec2d89df2a586816981de7c8aa (diff) | |
download | FreeBSD-src-265b2be119b5fdb39eee7541529f95fbb316f745.zip FreeBSD-src-265b2be119b5fdb39eee7541529f95fbb316f745.tar.gz |
Make KSE_STACKSIZE machine dependent by moving it from thr_kern.c to
pthread_md.h. This commit only moves the definition; it does not
change it for any of the platforms. This more easily allows 64-bit
architectures (in particular) to pick a slightly larger stack size.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/arch/amd64/include/pthread_md.h | 3 | ||||
-rw-r--r-- | lib/libkse/arch/i386/include/pthread_md.h | 2 | ||||
-rw-r--r-- | lib/libkse/arch/ia64/include/pthread_md.h | 2 | ||||
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 2 | ||||
-rw-r--r-- | lib/libpthread/arch/alpha/include/pthread_md.h | 2 | ||||
-rw-r--r-- | lib/libpthread/arch/amd64/include/pthread_md.h | 3 | ||||
-rw-r--r-- | lib/libpthread/arch/i386/include/pthread_md.h | 2 | ||||
-rw-r--r-- | lib/libpthread/arch/ia64/include/pthread_md.h | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_kern.c | 2 |
9 files changed, 14 insertions, 6 deletions
diff --git a/lib/libkse/arch/amd64/include/pthread_md.h b/lib/libkse/arch/amd64/include/pthread_md.h index 27a07cc..b0bde5a 100644 --- a/lib/libkse/arch/amd64/include/pthread_md.h +++ b/lib/libkse/arch/amd64/include/pthread_md.h @@ -40,12 +40,13 @@ /* <machine/sysarch.h> should define this, but doesn't. */ extern int sysarch(int, void *); +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) \ (void)_amd64_save_context(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) \ (void)_amd64_restore_context(&(ucp)->uc_mcontext, 0, NULL) - #define PER_KSE #undef PER_THREAD diff --git a/lib/libkse/arch/i386/include/pthread_md.h b/lib/libkse/arch/i386/include/pthread_md.h index 9718562..4bcb130 100644 --- a/lib/libkse/arch/i386/include/pthread_md.h +++ b/lib/libkse/arch/i386/include/pthread_md.h @@ -37,6 +37,8 @@ extern int _thr_setcontext(mcontext_t *, intptr_t, intptr_t *); extern int _thr_getcontext(mcontext_t *); +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) _thr_getcontext(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) _thr_setcontext(&(ucp)->uc_mcontext, 0, NULL) diff --git a/lib/libkse/arch/ia64/include/pthread_md.h b/lib/libkse/arch/ia64/include/pthread_md.h index a0d4236..6598f3d 100644 --- a/lib/libkse/arch/ia64/include/pthread_md.h +++ b/lib/libkse/arch/ia64/include/pthread_md.h @@ -33,6 +33,8 @@ #include <stddef.h> #include <ucontext.h> +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) PANIC("THR_SETCONTEXT() now in use!\n") diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index 4c78265..bf94a11 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -82,8 +82,6 @@ __FBSDID("$FreeBSD$"); #define MAX_CACHED_KSEGS 50 #endif -#define KSE_STACKSIZE 16384 - #define KSE_SET_MBOX(kse, thrd) \ (kse)->k_kcb->kcb_kmbx.km_curthread = &(thrd)->tcb->tcb_tmbx diff --git a/lib/libpthread/arch/alpha/include/pthread_md.h b/lib/libpthread/arch/alpha/include/pthread_md.h index 5a4bc99..27b6192 100644 --- a/lib/libpthread/arch/alpha/include/pthread_md.h +++ b/lib/libpthread/arch/alpha/include/pthread_md.h @@ -33,6 +33,8 @@ #include <stddef.h> #include <ucontext.h> +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) _alpha_save_context(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) _alpha_restore_context(&(ucp)->uc_mcontext, \ 0, NULL) diff --git a/lib/libpthread/arch/amd64/include/pthread_md.h b/lib/libpthread/arch/amd64/include/pthread_md.h index 27a07cc..b0bde5a 100644 --- a/lib/libpthread/arch/amd64/include/pthread_md.h +++ b/lib/libpthread/arch/amd64/include/pthread_md.h @@ -40,12 +40,13 @@ /* <machine/sysarch.h> should define this, but doesn't. */ extern int sysarch(int, void *); +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) \ (void)_amd64_save_context(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) \ (void)_amd64_restore_context(&(ucp)->uc_mcontext, 0, NULL) - #define PER_KSE #undef PER_THREAD diff --git a/lib/libpthread/arch/i386/include/pthread_md.h b/lib/libpthread/arch/i386/include/pthread_md.h index 9718562..4bcb130 100644 --- a/lib/libpthread/arch/i386/include/pthread_md.h +++ b/lib/libpthread/arch/i386/include/pthread_md.h @@ -37,6 +37,8 @@ extern int _thr_setcontext(mcontext_t *, intptr_t, intptr_t *); extern int _thr_getcontext(mcontext_t *); +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) _thr_getcontext(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) _thr_setcontext(&(ucp)->uc_mcontext, 0, NULL) diff --git a/lib/libpthread/arch/ia64/include/pthread_md.h b/lib/libpthread/arch/ia64/include/pthread_md.h index a0d4236..6598f3d 100644 --- a/lib/libpthread/arch/ia64/include/pthread_md.h +++ b/lib/libpthread/arch/ia64/include/pthread_md.h @@ -33,6 +33,8 @@ #include <stddef.h> #include <ucontext.h> +#define KSE_STACKSIZE 16384 + #define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext) #define THR_SETCONTEXT(ucp) PANIC("THR_SETCONTEXT() now in use!\n") diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index 4c78265..bf94a11 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -82,8 +82,6 @@ __FBSDID("$FreeBSD$"); #define MAX_CACHED_KSEGS 50 #endif -#define KSE_STACKSIZE 16384 - #define KSE_SET_MBOX(kse, thrd) \ (kse)->k_kcb->kcb_kmbx.km_curthread = &(thrd)->tcb->tcb_tmbx |