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.
This commit is contained in:
marcel 2003-09-19 23:28:13 +00:00
parent c1c7e8e350
commit 57ccbd6240
9 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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")

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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")

View File

@ -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