]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sparc / sys / ucontext.h
index 03ec8ae79107b624678ee93803831deaed715d69..d7bf2aedb9393a3abac9585d2b0986d4d8fc2f35 100644 (file)
@@ -1,20 +1,19 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifndef _SYS_UCONTEXT_H
 #define _SYS_UCONTEXT_H        1
@@ -81,11 +80,13 @@ typedef struct {
 typedef struct ucontext {
        struct ucontext         *uc_link;
        unsigned long           uc_flags;
-       unsigned long           uc_sigmask;
+       unsigned long           __uc_sigmask;
        mcontext_t              uc_mcontext;
+       stack_t                 uc_stack;
+       __sigset_t              uc_sigmask;
 } ucontext_t;
 
-#else /* __WORDSIZE == 32 */
+#endif /* __WORDISIZE == 64 */
 
 /*
  * Location of the users' stored registers relative to R0.
@@ -117,11 +118,24 @@ typedef struct ucontext {
  * treats arrays and structures as parameters.
  *
  * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)),
- * but that the ABI defines it absolutely to be 19.
+ * but that the ABI defines it absolutely to be 21 (resp. 19).
  */
-#define NGREG   19
 
+#if __WORDSIZE == 64
+
+#define REG_ASI        (19)
+#define REG_FPRS (20)
+
+#define NGREG   21
+typedef long greg_t;
+
+#else /* __WORDSIZE == 32 */
+
+#define NGREG   19
 typedef int greg_t;
+
+#endif /* __WORDSIZE == 32 */
+
 typedef greg_t  gregset_t[NGREG];
 
 /*
@@ -182,10 +196,28 @@ struct fq
 #define V9_FPU_FSR_TYPE         unsigned long long
 #define V9_FPU_FPRS_TYPE        unsigned
 
+#if __WORDSIZE == 64
+
+typedef struct fpu
+  {
+    union {                            /* FPU floating point regs */
+      unsigned         fpu_regs[32];   /* 32 singles */
+      double            fpu_dregs[32]; /* 32 doubles */
+      long double      fpu_qregs[16];  /* 16 quads */
+    } fpu_fr;
+    struct fq       *fpu_q;            /* ptr to array of FQ entries */
+    unsigned long   fpu_fsr;           /* FPU status register */
+    unsigned char   fpu_qcnt;          /* # of entries in saved FQ */
+    unsigned char   fpu_q_entrysize;   /* # of bytes per FQ entry */
+    unsigned char   fpu_en;            /* flag signifying fpu in use */
+  } fpregset_t;
+
+#else /* __WORDSIZE == 32 */
+
 typedef struct fpu
   {
     union {                            /* FPU floating point regs */
-      unsigned long long fpu_regs[32]; /* 32 singles */
+      __extension__ unsigned long long fpu_regs[32];   /* 32 singles */
       double             fpu_dregs[16];        /* 16 doubles */
     } fpu_fr;
     struct fq       *fpu_q;            /* ptr to array of FQ entries */
@@ -228,10 +260,9 @@ typedef struct ucontext
   {
     unsigned long   uc_flags;
     struct ucontext *uc_link;
-    unsigned long   uc_sigmask[4];     /* a svr4 sigset_t */
+    __sigset_t     uc_sigmask;
     stack_t         uc_stack;
     mcontext_t      uc_mcontext;
-    long            uc_filler[23];
   } ucontext_t;
 
 #endif /* __WORDSIZE == 32 */