Module Name:    src
Committed By:   matt
Date:           Fri Apr 29 08:14:36 UTC 2011

Modified Files:
        src/sys/sys [matt-nb5-mips64]: ucontext.h

Log Message:
Sync with -current


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.12.1 src/sys/sys/ucontext.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/ucontext.h
diff -u src/sys/sys/ucontext.h:1.11 src/sys/sys/ucontext.h:1.11.12.1
--- src/sys/sys/ucontext.h:1.11	Wed Oct 15 06:51:21 2008
+++ src/sys/sys/ucontext.h	Fri Apr 29 08:14:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucontext.h,v 1.11 2008/10/15 06:51:21 wrstuden Exp $	*/
+/*	$NetBSD: ucontext.h,v 1.11.12.1 2011/04/29 08:14:36 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2003 The NetBSD Foundation, Inc.
@@ -57,10 +57,30 @@
 #define _UC_STACK	0x02		/* valid uc_stack */
 #define _UC_CPU		0x04		/* valid GPR context in uc_mcontext */
 #define _UC_FPU		0x08		/* valid FPU context in uc_mcontext */
+#define	_UC_MD		0x40070020	/* MD bits.  see below */
+
+/*
+ * _UC_MD includes:
+ *	_UC_SETSTACK	0x00010000 (many ports) and 0x00020000 (arm)
+ *	_UC_CLRSTACK	0x00020000 (many ports) and 0x00040000 (arm)
+ *	_UC_POWERPC_VEC	0x00010000 (powerpc)
+ *	_UC_M68K_UC_USER 0x40000000 (m68k)
+ *	_UC_UNIQUE	0x00000020 (alpha)
+ *	_UC_ARM_VFP	0x00010000 (arm)
+ *	_UC_VM		0x00040000 (i386)
+ *	_UC_FXSAVE	0x00000020 (i386)
+ *
+ * if your port needs more MD bits, please try to choose bits from _UC_MD
+ * first, rather than picking random unused bits.
+ */
 
 #ifdef _KERNEL
 struct lwp;
 
+#ifdef __UCONTEXT_SIZE
+__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE)
+#endif
+
 void	getucontext(struct lwp *, ucontext_t *);
 void	getucontext_sa(struct lwp *, ucontext_t *);
 int	setucontext(struct lwp *, const ucontext_t *);

Reply via email to