aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/threadimpl.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-11-04 16:34:19 +0000
committerrsc <devnull@localhost>2005-11-04 16:34:19 +0000
commit1e05fdf92cf4c3ae32c52d6928f3e74000b76f6a (patch)
tree2df6702fe73590dbf26e59a854d903481362574a /src/libthread/threadimpl.h
parentb4d5d19438106b3904185eb9ba7d6e1b8b0cfdf7 (diff)
downloadplan9port-1e05fdf92cf4c3ae32c52d6928f3e74000b76f6a.tar.gz
plan9port-1e05fdf92cf4c3ae32c52d6928f3e74000b76f6a.tar.bz2
plan9port-1e05fdf92cf4c3ae32c52d6928f3e74000b76f6a.zip
use macro for getcontext (setjmp)
Diffstat (limited to 'src/libthread/threadimpl.h')
-rw-r--r--src/libthread/threadimpl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
index 09276bb3..9757526e 100644
--- a/src/libthread/threadimpl.h
+++ b/src/libthread/threadimpl.h
@@ -13,8 +13,10 @@
#include "thread.h"
#if defined(__FreeBSD__) && __FreeBSD__ < 5
-extern int getcontext(ucontext_t*);
-extern void setcontext(ucontext_t*);
+extern int getmcontext(mcontext_t*);
+extern void setmcontext(mcontext_t*);
+#define setcontext(u) setmcontext(&(u)->uc_mcontext)
+#define getcontext(u) getmcontext(&(u)->uc_mcontext)
extern int swapcontext(ucontext_t*, ucontext_t*);
extern void makecontext(ucontext_t*, void(*)(), int, ...);
#endif