unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alistair Francis via Libc-alpha <libc-alpha@sourceware.org>
To: libc-alpha@sourceware.org
Cc: stepan@golosunov.pp.ru, Alistair Francis <alistair.francis@wdc.com>
Subject: [PATCH v8 1/2] sysv: linux: Define the __semid_ds32 struct
Date: Wed, 13 May 2020 08:22:48 -0700	[thread overview]
Message-ID: <20200513152249.5103-2-alistair.francis@wdc.com> (raw)
In-Reply-To: <20200513152249.5103-1-alistair.francis@wdc.com>

Define a struct for 32-bit systems for the semctl command.
---
 .../unix/sysv/linux/hppa/struct__semid_ds32.h | 30 +++++++++++++++++++
 .../unix/sysv/linux/mips/struct__semid_ds32.h | 28 +++++++++++++++++
 .../sysv/linux/powerpc/struct__semid_ds32.h   | 30 +++++++++++++++++++
 .../sysv/linux/sparc/struct__semid_ds32.h     | 30 +++++++++++++++++++
 sysdeps/unix/sysv/linux/struct__semid_ds32.h  | 30 +++++++++++++++++++
 .../unix/sysv/linux/x86/struct__semid_ds32.h  | 30 +++++++++++++++++++
 6 files changed, 178 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/hppa/struct__semid_ds32.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/struct__semid_ds32.h
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/struct__semid_ds32.h
 create mode 100644 sysdeps/unix/sysv/linux/sparc/struct__semid_ds32.h
 create mode 100644 sysdeps/unix/sysv/linux/struct__semid_ds32.h
 create mode 100644 sysdeps/unix/sysv/linux/x86/struct__semid_ds32.h

diff --git a/sysdeps/unix/sysv/linux/hppa/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/hppa/struct__semid_ds32.h
new file mode 100644
index 0000000000..7a6b803cee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/struct__semid_ds32.h
@@ -0,0 +1,30 @@
+/* HPPA implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime_high;    /* last semop() time high */
+  __syscall_ulong_t   sem_otime;         /* last semop() time */
+  __syscall_ulong_t   sem_ctime_high;    /* last time changed by semctl() high */
+  __syscall_ulong_t   sem_ctime;         /* last time changed by semctl() */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   __glibc_reserved3;
+  __syscall_ulong_t   __glibc_reserved4;
+};
diff --git a/sysdeps/unix/sysv/linux/mips/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/mips/struct__semid_ds32.h
new file mode 100644
index 0000000000..3a1d7c6885
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/struct__semid_ds32.h
@@ -0,0 +1,28 @@
+/* MIPS implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime;         /* last semop time */
+  __syscall_ulong_t   sem_ctime;         /* last change time */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   sem_otime_high;
+  __syscall_ulong_t   sem_ctime_high;
+};
diff --git a/sysdeps/unix/sysv/linux/powerpc/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/powerpc/struct__semid_ds32.h
new file mode 100644
index 0000000000..880c0a3c04
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/struct__semid_ds32.h
@@ -0,0 +1,30 @@
+/* PowerPC implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime_high;    /* last semop() time high */
+  __syscall_ulong_t   sem_otime;         /* last semop() time */
+  __syscall_ulong_t   sem_ctime_high;    /* last time changed by semctl() high */
+  __syscall_ulong_t   sem_ctime;         /* last time changed by semctl() */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   __glibc_reserved3;
+  __syscall_ulong_t   __glibc_reserved4;
+};
diff --git a/sysdeps/unix/sysv/linux/sparc/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/sparc/struct__semid_ds32.h
new file mode 100644
index 0000000000..0be263ccd0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/struct__semid_ds32.h
@@ -0,0 +1,30 @@
+/* Sparc implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime_high;    /* last semop() time high */
+  __syscall_ulong_t   sem_otime;         /* last semop() time */
+  __syscall_ulong_t   sem_ctime_high;    /* last time changed by semctl() high */
+  __syscall_ulong_t   sem_ctime;         /* last time changed by semctl() */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   __glibc_reserved3;
+  __syscall_ulong_t   __glibc_reserved4;
+};
diff --git a/sysdeps/unix/sysv/linux/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/struct__semid_ds32.h
new file mode 100644
index 0000000000..c5242f4096
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/struct__semid_ds32.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime;         /* last semop() time */
+  __syscall_ulong_t   sem_otime_high;    /* last semop() time high */
+  __syscall_ulong_t   sem_ctime;         /* last time changed by semctl() */
+  __syscall_ulong_t   sem_ctime_high;    /* last time changed by semctl() high */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   __glibc_reserved3;
+  __syscall_ulong_t   __glibc_reserved4;
+};
diff --git a/sysdeps/unix/sysv/linux/x86/struct__semid_ds32.h b/sysdeps/unix/sysv/linux/x86/struct__semid_ds32.h
new file mode 100644
index 0000000000..1155f5f93a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/struct__semid_ds32.h
@@ -0,0 +1,30 @@
+/* x86 implementation of the semaphore struct __semid_ds32.
+   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/>.  */
+
+/* This is the "new" y2038 types defined after the 5.1 kernel. It allows
+   the kernel to use {o,c}time{_high} values to support a 64-bit time_t.  */
+struct __semid_ds32 {
+  struct ipc_perm sem_perm;              /* operation permission struct */
+  __syscall_ulong_t   sem_otime;         /* last semop() time */
+  __syscall_ulong_t   sem_otime_high;    /* last semop() time high */
+  __syscall_ulong_t   sem_ctime;         /* last time changed by semctl() */
+  __syscall_ulong_t   sem_ctime_high;    /* last time changed by semctl() high */
+  __syscall_ulong_t   sem_nsems;         /* number of semaphores in set */
+  __syscall_ulong_t   __glibc_reserved3;
+  __syscall_ulong_t   __glibc_reserved4;
+};
-- 
2.26.2


  reply	other threads:[~2020-05-13 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 15:22 [PATCH v8 0/2] Support semctl_syscall() for __TIMESIZE==64 Alistair Francis via Libc-alpha
2020-05-13 15:22 ` Alistair Francis via Libc-alpha [this message]
2020-05-13 15:22 ` [PATCH v8 2/2] sysv: linux: Pass 64-bit version of semctl syscall Alistair Francis via Libc-alpha
2020-05-27 15:38   ` Andreas Schwab
2020-06-01  1:44     ` Alistair Francis via Libc-alpha
2020-05-27  1:42 ` [PATCH v8 0/2] Support semctl_syscall() for __TIMESIZE==64 Vineet Gupta via Libc-alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200513152249.5103-2-alistair.francis@wdc.com \
    --to=libc-alpha@sourceware.org \
    --cc=alistair.francis@wdc.com \
    --cc=stepan@golosunov.pp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).