diff options
author | marcel <marcel@FreeBSD.org> | 2003-08-05 19:37:20 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-08-05 19:37:20 +0000 |
commit | ad82646deb3641ae38ecc9edcb28cf49eb9c5c6c (patch) | |
tree | 7cebe5609986adfbfb2105c01494553f64a85897 | |
parent | e05a88d781eee3b058406d71156460c631e24384 (diff) | |
download | FreeBSD-src-ad82646deb3641ae38ecc9edcb28cf49eb9c5c6c.zip FreeBSD-src-ad82646deb3641ae38ecc9edcb28cf49eb9c5c6c.tar.gz |
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.
-rw-r--r-- | lib/libkse/arch/ia64/include/pthread_md.h | 9 | ||||
-rw-r--r-- | lib/libpthread/arch/ia64/include/pthread_md.h | 9 |
2 files changed, 10 insertions, 8 deletions
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 { diff --git a/lib/libpthread/arch/ia64/include/pthread_md.h b/lib/libpthread/arch/ia64/include/pthread_md.h index 94e05a0..6d30025 100644 --- a/lib/libpthread/arch/ia64/include/pthread_md.h +++ b/lib/libpthread/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 { |