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:
parent
c1c7e8e350
commit
57ccbd6240
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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")
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user