aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/mips-linux-gnu/bits
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/include/mips-linux-gnu/bits')
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/floatn.h97
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/resource.h2
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/semaphore.h (renamed from lib/libc/include/mips-linux-gnu/bits/sem-pad.h)26
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/shm-pad.h26
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/signum-arch.h65
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/signum.h68
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h56
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h (renamed from lib/libc/include/mips-linux-gnu/bits/msq-pad.h)27
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h49
9 files changed, 301 insertions, 115 deletions
diff --git a/lib/libc/include/mips-linux-gnu/bits/floatn.h b/lib/libc/include/mips-linux-gnu/bits/floatn.h
new file mode 100644
index 0000000000..68a17ab2c7
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnu/bits/floatn.h
@@ -0,0 +1,97 @@
+/* Macros to control TS 18661-3 glibc features on MIPS platforms.
+ Copyright (C) 2017-2020 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 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_FLOATN_H
+#define _BITS_FLOATN_H
+
+#include <features.h>
+#include <bits/long-double.h>
+
+/* Defined to 1 if the current compiler invocation provides a
+ floating-point type with the IEEE 754 binary128 format, and this
+ glibc includes corresponding *f128 interfaces for it. */
+#ifndef __NO_LONG_DOUBLE_MATH
+# define __HAVE_FLOAT128 1
+#else
+/* glibc does not support _Float128 for platforms where long double is
+ normally binary128 when building with long double as binary64.
+ GCC's default for supported scalar modes does not support it either
+ in that case. */
+# define __HAVE_FLOAT128 0
+#endif
+
+/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
+ from the default float, double and long double types in this glibc. */
+#define __HAVE_DISTINCT_FLOAT128 0
+
+/* Defined to 1 if the current compiler invocation provides a
+ floating-point type with the right format for _Float64x, and this
+ glibc includes corresponding *f64x interfaces for it. */
+#define __HAVE_FLOAT64X __HAVE_FLOAT128
+
+/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
+ of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
+ the format of _Float128, which must be different from that of long
+ double. */
+#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1. */
+# if __HAVE_FLOAT128
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+/* The literal suffix f128 exists only since GCC 7.0. */
+# define __f128(x) x##l
+# else
+# define __f128(x) x##f128
+# endif
+# endif
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
+# if __HAVE_FLOAT128
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+# define __CFLOAT128 _Complex long double
+# else
+# define __CFLOAT128 _Complex _Float128
+# endif
+# endif
+
+/* The remaining of this file provides support for older compilers. */
+# if __HAVE_FLOAT128
+
+/* The type _Float128 exists only since GCC 7.0. */
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+typedef long double _Float128;
+# endif
+
+/* Various built-in functions do not exist before GCC 7.0. */
+# if !__GNUC_PREREQ (7, 0)
+# define __builtin_huge_valf128() (__builtin_huge_vall ())
+# define __builtin_inff128() (__builtin_infl ())
+# define __builtin_nanf128(x) (__builtin_nanl (x))
+# define __builtin_nansf128(x) (__builtin_nansl (x))
+# endif
+
+# endif
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h>
+
+#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnu/bits/resource.h
index 11fc73b49d..f2a2c48a9d 100644
--- a/lib/libc/include/mips-linux-gnu/bits/resource.h
+++ b/lib/libc/include/mips-linux-gnu/bits/resource.h
@@ -98,7 +98,7 @@ enum __rlimit_resource
__RLIMIT_RTPRIO = 14,
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
- /* Maximum CPU time in µs that a process scheduled under a real-time
+ /* Maximum CPU time in microseconds that a process scheduled under a real-time
scheduling policy may consume without making a blocking system
call before being forcibly descheduled. */
__RLIMIT_RTTIME = 15,
diff --git a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h b/lib/libc/include/mips-linux-gnu/bits/semaphore.h
index 0638180f08..e28b319eb5 100644
--- a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h
+++ b/lib/libc/include/mips-linux-gnu/bits/semaphore.h
@@ -1,5 +1,4 @@
-/* Define where padding goes in struct semid_ds. MIPS version.
- Copyright (C) 2018-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2020 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
@@ -13,12 +12,25 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
+ License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#ifndef _SYS_SEM_H
-# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
-#define __SEM_PAD_AFTER_TIME 0
-#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file
+#if _MIPS_SIM == _ABI64
+# define __SIZEOF_SEM_T 32
+#else
+# define __SIZEOF_SEM_T 16
+#endif
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t; \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h b/lib/libc/include/mips-linux-gnu/bits/shm-pad.h
deleted file mode 100644
index 1c596174a8..0000000000
--- a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Define where padding goes in struct shmid_ds. MIPS version.
- Copyright (C) 2018-2020 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 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_SHM_H
-# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
-#endif
-
-#define __SHM_PAD_AFTER_TIME 0
-#define __SHM_PAD_BEFORE_TIME 0
-#define __SHM_SEGSZ_AFTER_TIME 0
-#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h b/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
new file mode 100644
index 0000000000..5ca20ca480
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
@@ -0,0 +1,65 @@
+/* Signal number definitions. Linux/MIPS version.
+ Copyright (C) 1995-2020 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 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGNUM_H
+#define _BITS_SIGNUM_H 1
+
+#ifndef _SIGNAL_H
+#error "Never include <bits/signum.h> directly; use <signal.h> instead."
+#endif
+
+/* Adjustments and additions to the signal number constants for
+ Linux/MIPS. */
+
+#define SIGEMT 7 /* Emulator trap. */
+#define SIGPWR 19 /* Power failure imminent. */
+
+/* Historical signals specified by POSIX. */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSYS 12 /* Bad system call. */
+
+/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
+#define SIGURG 21 /* Urgent data is available at a socket. */
+#define SIGSTOP 23 /* Stop, unblockable. */
+#define SIGTSTP 24 /* Keyboard stop. */
+#define SIGCONT 25 /* Continue. */
+#define SIGCHLD 18 /* Child terminated or stopped. */
+#define SIGTTIN 26 /* Background read from control terminal. */
+#define SIGTTOU 27 /* Background write to control terminal. */
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGXCPU 30 /* CPU time limit exceeded. */
+#define SIGVTALRM 28 /* Virtual timer expired. */
+#define SIGPROF 29 /* Profiling timer expired. */
+#define SIGXFSZ 31 /* File size limit exceeded. */
+#define SIGUSR1 16 /* User-defined signal 1. */
+#define SIGUSR2 17 /* User-defined signal 2. */
+
+/* Nonstandard signals found in all modern POSIX systems
+ (including both BSD and Linux). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+
+/* Archaic names for compatibility. */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
+#define SIGCLD SIGCHLD /* Old System V name */
+
+/* By default no real-time signals are supported. */
+#define __SIGRTMIN 32
+#define __SIGRTMAX 127
+
+#endif /* <signal.h> included. */ \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/signum.h b/lib/libc/include/mips-linux-gnu/bits/signum.h
deleted file mode 100644
index e9fa21916b..0000000000
--- a/lib/libc/include/mips-linux-gnu/bits/signum.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Signal number definitions. Linux/MIPS version.
- Copyright (C) 1995-2020 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 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_SIGNUM_H
-#define _BITS_SIGNUM_H 1
-
-#ifndef _SIGNAL_H
-#error "Never include <bits/signum.h> directly; use <signal.h> instead."
-#endif
-
-#include <bits/signum-generic.h>
-
-/* Adjustments and additions to the signal number constants for
- Linux/MIPS. */
-
-#define SIGEMT 7 /* Emulator trap. */
-#define SIGPWR 19 /* Power failure imminent. */
-
-#undef SIGUSR1
-#define SIGUSR1 16
-#undef SIGUSR2
-#define SIGUSR2 17
-#undef SIGCHLD
-#define SIGCHLD 18
-#undef SIGWINCH
-#define SIGWINCH 20
-#undef SIGURG
-#define SIGURG 21
-#undef SIGPOLL
-#define SIGPOLL 22
-#undef SIGSTOP
-#define SIGSTOP 23
-#undef SIGTSTP
-#define SIGTSTP 24
-#undef SIGCONT
-#define SIGCONT 25
-#undef SIGTTIN
-#define SIGTTIN 26
-#undef SIGTTOU
-#define SIGTTOU 27
-#undef SIGVTALRM
-#define SIGVTALRM 28
-#undef SIGPROF
-#define SIGPROF 29
-#undef SIGXCPU
-#define SIGXCPU 30
-#undef SIGXFSZ
-#define SIGXFSZ 31
-
-#undef __SIGRTMAX
-#define __SIGRTMAX 127
-
-#endif /* <signal.h> included. */ \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
new file mode 100644
index 0000000000..d469ca5f18
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
@@ -0,0 +1,56 @@
+/* Linux/MIPS implementation of the SysV message struct msqid_ds.
+ Copyright (C) 2020 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 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+#if __TIMESIZE == 32
+# ifdef __MIPSEL__
+ __time_t msg_stime; /* time of last msgsnd command */
+ unsigned long int __msg_stime_high;
+ __time_t msg_rtime; /* time of last msgsnd command */
+ unsigned long int __msg_rtime_high;
+ __time_t msg_ctime; /* time of last change */
+ unsigned long int __msg_ctime_high;
+# else
+ unsigned long int __msg_stime_high;
+ __time_t msg_stime; /* time of last msgsnd command */
+ unsigned long int __msg_rtime_high;
+ __time_t msg_rtime; /* time of last msgsnd command */
+ unsigned long int __msg_ctime_high;
+ __time_t msg_ctime; /* time of last change */
+# endif
+#else
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgsnd command */
+ __time_t msg_ctime; /* time of last change */
+#endif
+ __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ __syscall_ulong_t __glibc_reserved4;
+ __syscall_ulong_t __glibc_reserved5;
+}; \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
index 132f7815a7..a6ca82cbec 100644
--- a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
@@ -1,5 +1,5 @@
-/* Define where padding goes in struct msqid_ds. MIPS version.
- Copyright (C) 2018-2020 Free Software Foundation, Inc.
+/* MIPS implementation of the semaphore struct semid_ds
+ Copyright (C) 1995-2020 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
@@ -16,16 +16,17 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#ifndef _SYS_MSG_H
-# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
#endif
-#include <bits/timesize.h>
-
-#ifdef __MIPSEL__
-# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32)
-# define __MSQ_PAD_BEFORE_TIME 0
-#else
-# define __MSQ_PAD_AFTER_TIME 0
-# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32)
-#endif \ No newline at end of file
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ __syscall_ulong_t sem_nsems; /* number of semaphores in set */
+ __syscall_ulong_t __sem_otime_high;
+ __syscall_ulong_t __sem_ctime_high;
+}; \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
new file mode 100644
index 0000000000..4398086812
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
@@ -0,0 +1,49 @@
+/* Linux/MIPS implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020 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 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+/* Data structure describing a shared memory segment. */
+struct shmid_ds
+ {
+ struct ipc_perm shm_perm; /* operation permission struct */
+ size_t shm_segsz; /* size of segment in bytes */
+#if __TIMESIZE == 32
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+#else
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+#endif
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+#if __TIMESIZE == 32
+ unsigned short int __shm_atime_high;
+ unsigned short int __shm_dtime_high;
+ unsigned short int __shm_ctime_high;
+ unsigned short int __glibc_reserved4;
+#else
+ __syscall_ulong_t __glibc_reserved5;
+ __syscall_ulong_t __glibc_reserved6;
+#endif
+ }; \ No newline at end of file