topenbsd - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit b4b686415dcb5ffd64a48d04ad5576de54958eaf
parent 1d41999e22bdc554ec760310f2ff9fb46468ff58
Author: rsc 
Date:   Wed, 20 Jul 2005 23:29:56 +0000

openbsd

Diffstat:
  M src/libthread/386-ucontext.h        |      11 ++++++-----
  M src/libthread/sysofiles.sh          |       2 ++
  M src/libthread/threadimpl.h          |       4 ++++

3 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/libthread/386-ucontext.h b/src/libthread/386-ucontext.h
t@@ -1,4 +1,5 @@
-
+typedef struct mcontext mcontext_t;
+typedef struct ucontext ucontext_t;
 
 extern        int                getcontext(ucontext_t*);
 extern        void                setcontext(ucontext_t*);
t@@ -67,7 +68,7 @@ extern        void                makecontext(ucontext_t*, void(*)(), int, ...);
  * $FreeBSD: src/sys/i386/include/ucontext.h,v 1.4 1999/10/11 20:33:09 luoqi Exp $
  */
 
-typedef struct __mcontext {
+struct mcontext {
         /*
          * The first 20 fields must match the definition of
          * sigcontext. So that we can support sigcontext
t@@ -96,9 +97,9 @@ typedef struct __mcontext {
 
         int        mc_fpregs[28];                /* env87 + fpacc87 + u_long */
         int        __spare__[17];
-} mcontext_t;
+};
 
-typedef struct __ucontext {
+struct ucontext {
         /*
          * Keep the order of the first two fields. Also,
          * keep them the first two fields in the structure.
t@@ -113,6 +114,6 @@ typedef struct __ucontext {
         struct __ucontext *uc_link;
         stack_t                uc_stack;
         int                __spare__[8];
-} ucontext_t;
+};
 
 
diff --git a/src/libthread/sysofiles.sh b/src/libthread/sysofiles.sh
t@@ -23,6 +23,8 @@ case "$tag" in
 *-Darwin-*)
         echo ${SYSNAME}-${OBJTYPE}-asm.o ${SYSNAME}-${OBJTYPE}.o pthread.o
         ;;
+386-OpenBSD-*)
+        echo ${SYSNAME}-${OBJTYPE}-asm.o ${SYSNAME}-${OBJTYPE}.o pthread.o
 *-OpenBSD-*)
         echo ${SYSNAME}-${OBJTYPE}-asm.o ${SYSNAME}-${OBJTYPE}.o $SYSNAME.o
         ;;
diff --git a/src/libthread/threadimpl.h b/src/libthread/threadimpl.h
t@@ -28,6 +28,10 @@ extern        void                makecontext(ucontext_t*, void(*)(), int, ...);
 #endif
 
 #if defined(__OpenBSD__)
+#        define mcontext libthread_mcontext
+#        define mcontext_t libthread_mcontext_t
+#        define ucontext libthread_ucontext
+#        define ucontext_t libthread_ucontext_t
 #        if defined __i386__
 #                include "386-ucontext.h"
 #        else