From ad82646deb3641ae38ecc9edcb28cf49eb9c5c6c Mon Sep 17 00:00:00 2001 From: marcel Date: Tue, 5 Aug 2003 19:37:20 +0000 Subject: Define THR_GETCONTEXT and THR_SETCONTEXT in terms of the userland context functions. We don't need to enter the kernel anymore. The contexts are compatible (ie a context created by getcontext() can be restored by _ia64_restore_context()). While here, make the use of THR_ALIGNBYTES and THR_ALIGN a no-op. They are going to be removed anyway. --- lib/libkse/arch/ia64/include/pthread_md.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/libkse/arch/ia64') diff --git a/lib/libkse/arch/ia64/include/pthread_md.h b/lib/libkse/arch/ia64/include/pthread_md.h index 94e05a0..6d30025 100644 --- a/lib/libkse/arch/ia64/include/pthread_md.h +++ b/lib/libkse/arch/ia64/include/pthread_md.h @@ -29,11 +29,12 @@ #ifndef _PTHREAD_MD_H_ #define _PTHREAD_MD_H_ -#define THR_GETCONTEXT(ucp) getcontext(ucp) -#define THR_SETCONTEXT(ucp) setcontext(ucp) +#define THR_GETCONTEXT(ucp) _ia64_save_context(&(ucp)->uc_mcontext) +#define THR_SETCONTEXT(ucp) _ia64_restore_context(&(ucp)->uc_mcontext, \ + 0, NULL) -#define THR_ALIGNBYTES 15 -#define THR_ALIGN(td) (((uintptr_t)(td) + THR_ALIGNBYTES) & ~THR_ALIGNBYTES) +#define THR_ALIGNBYTES 0 +#define THR_ALIGN(td) (td) /* KSE Specific Data. */ struct ksd { -- cgit v1.1