aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/Darwin-ucontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libthread/Darwin-ucontext.h')
-rw-r--r--src/libthread/Darwin-ucontext.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/libthread/Darwin-ucontext.h b/src/libthread/Darwin-ucontext.h
index c7915ff8..a39be28a 100644
--- a/src/libthread/Darwin-ucontext.h
+++ b/src/libthread/Darwin-ucontext.h
@@ -1,5 +1,6 @@
+typedef struct mcontext mcontext_t;
typedef struct ucontext ucontext_t;
-struct ucontext
+struct mcontext
{
ulong pc; /* lr */
ulong cr; /* mfcr */
@@ -15,10 +16,20 @@ struct ucontext
// ulong vr[4*12]; /* callee saved: v20-v31, 256-bits each */
};
+struct ucontext
+{
+ struct {
+ void *ss_sp;
+ uint ss_size;
+ } uc_stack;
+ sigset_t uc_sigmask;
+ mcontext_t mc;
+};
+
void makecontext(ucontext_t*, void(*)(void), int, ...);
-void getcontext(ucontext_t*);
+int getcontext(ucontext_t*);
int setcontext(ucontext_t*);
int swapcontext(ucontext_t*, ucontext_t*);
-int __setlabel(ucontext_t*);
-void __gotolabel(ucontext_t*);
+int _getmcontext(mcontext_t*);
+void _setmcontext(mcontext_t*);