summaryrefslogtreecommitdiffstats
path: root/lib/libkse/arch/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-05 19:37:20 +0000
committermarcel <marcel@FreeBSD.org>2003-08-05 19:37:20 +0000
commitad82646deb3641ae38ecc9edcb28cf49eb9c5c6c (patch)
tree7cebe5609986adfbfb2105c01494553f64a85897 /lib/libkse/arch/ia64
parente05a88d781eee3b058406d71156460c631e24384 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'lib/libkse/arch/ia64')
-rw-r--r--lib/libkse/arch/ia64/include/pthread_md.h9
1 files changed, 5 insertions, 4 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 {
OpenPOWER on IntegriCloud