[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hotspot patches (3)



add the mcontext_t to sys headers.  hotspot wants to use this.  we don't 
have get/setcontect syscalls, but apparently they aren't needed.  the use 
of mcontext_t probably needs to be revisited, but this lets it build.  
after applying to sys/  either make includes or copy to /usr/include/... 
appropriately.  this patch is only for i386, it might break other 
archs' builds.


Index: sys/signal.h
===================================================================
RCS file: /home/tedu/cvs/src/sys/sys/signal.h,v
retrieving revision 1.16
diff -u -r1.16 signal.h
--- sys/signal.h	14 Jan 2004 05:23:25 -0000	1.16
+++ sys/signal.h	4 Feb 2004 14:20:29 -0000
@@ -189,7 +189,13 @@
 	int	ss_onstack;		/* current status */
 };
 
-typedef struct sigcontext ucontext_t;
+typedef struct __ucontext {
+	sigset_t	uc_sigmask;
+	mcontext_t	uc_mcontext;
+	stack_t		uc_stack;
+	int		uc_flags;
+} ucontext_t;
+
 
 /*
  * Macro for converting signal number to a mask suitable for
Index: arch/i386/include/signal.h
===================================================================
RCS file: /home/tedu/cvs/src/sys/arch/i386/include/signal.h,v
retrieving revision 1.4
diff -u -r1.4 signal.h
--- arch/i386/include/signal.h	2 Jun 2003 23:27:47 -0000	1.4
+++ arch/i386/include/signal.h	4 Feb 2004 14:20:13 -0000
@@ -76,10 +76,39 @@
 	int	sc_err;
 };
 
+
+
 #define sc_sp sc_esp
 #define sc_fp sc_ebp
 #define sc_pc sc_eip
 #define sc_ps sc_eflags
+
+typedef struct __sigcontext {
+	int	mc_gs;
+	int	mc_fs;
+	int	mc_es;
+	int	mc_ds;
+	int	mc_edi;
+	int	mc_esi;
+	int	mc_ebp;
+	int	mc_ebx;
+	int	mc_edx;
+	int	mc_ecx;
+	int	mc_eax;
+	/* XXX */
+	int	mc_eip;
+	int	mc_cs;
+	int	mc_eflags;
+	int	mc_esp;
+	int	mc_ss;
+
+	int	mc_onstack;		/* sigstack state to restore */
+	int	mc_mask;		/* signal mask to restore */
+
+	int	mc_trapno;		/* XXX should be above */
+	int	mc_err;
+} mcontext_t;
+
 
 #endif	/* !_ANSI_SOURCE */
 #endif	/* !_I386_SIGNAL_H_ */

-- 
the only reason you're still alive
is because someone has decided to let you live



Visit your host, monkey.org