Print this page
XXX AVX procfs

@@ -70,34 +70,48 @@
 typedef struct ucontext ucontext_t;
 #else
 typedef struct __ucontext ucontext_t;
 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
+#define XRS_ID  0x00737278      /* the string "xrs" */
+
+typedef struct {
+        unsigned long   xrs_id;
+        caddr_t         xrs_ptr;
+} xrs_t;
+
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 struct  ucontext {
 #else
 struct  __ucontext {
 #endif
         unsigned long   uc_flags;
         ucontext_t      *uc_link;
         sigset_t        uc_sigmask;
         stack_t         uc_stack;
         mcontext_t      uc_mcontext;
-        long            uc_filler[5];   /* see ABI spec for Intel386 */
+        xrs_t           uc_xrs;
+        long            uc_filler[3];   /* see ABI spec for Intel386 */
 };
 
 #if defined(_SYSCALL32)
 
+typedef struct {
+        uint32_t        xrs_id;
+        caddr32_t       xrs_ptr;
+} xrs32_t;
+
 /* Kernel view of user ILP32 ucontext structure */
 
 typedef struct ucontext32 {
         uint32_t        uc_flags;
         caddr32_t       uc_link;
         sigset_t        uc_sigmask;
         stack32_t       uc_stack;
         mcontext32_t    uc_mcontext;
-        int32_t         uc_filler[5];
+        xrs32_t         uc_xrs;
+        int32_t         uc_filler[3];
 } ucontext32_t;
 
 #if defined(_KERNEL)
 extern void ucontext_nto32(const ucontext_t *src, ucontext32_t *dest);
 extern void ucontext_32ton(const ucontext32_t *src, ucontext_t *dest);

@@ -120,10 +134,11 @@
 
 #define UC_SIGMASK      0x01
 #define UC_STACK        0x02
 #define UC_CPU          0x04
 #define UC_MAU          0x08
+#define UC_XREGS        0x10
 #define UC_FPU          UC_MAU
 
 #define UC_MCONTEXT     (UC_CPU|UC_FPU)
 
 /*