This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v4 00/17] Consolidate Linux sysvipc implementation


Changes from previous version:

 - Change __ASSUME_SYSVIPC_SYSCALL to __ASSUME_DIRECT_SYSVIPC_SYSCALL.
 - Remove some misplaced comments.
 - Fixed some misspelling and grammatical mistakes.
 - Adjust to use the new subdirectory for test infrastructure (commit
   c23de0aacbea).

Also, I did not add AArch64/ILP32 __IPC_64 definition because I would
to confirm that 1 is really the expected value for the architecture.

--

This patchset is a continuation of my Linux syscall consolidation
implementation and aimed for SySV IPC (message queue, semaphore,
and shared memory).

Current Linux default implementation only defines the old ipc
syscall method.  Architectures need to either to imply the generic
syscalls.list or reimplement the syscall definition.  To simplify
and allow to remove some old arch-specific implementation, I added
the direct syscall method for all supported IPC mechanisms.

Other changes are simple code reorganization to simplify and all
compatibility required for various ports.

The patchset also adds 3 simple tests that aims to check for correct
argument passing on syscall.  The idea is not to be an extensive
testing of all supported IPC.

Checked on x86_64, i686, armhf, aarch64, and powerpc64le.

Adhemerval Zanella (17):
  Add __ASSUME_DIRECT_SYSVIPC_SYSCALL for Linux
  Refactor Linux ipc_priv header
  Consolidate Linux msgctl implementation
  Consolidate Linux msgrcv implementation
  Use msgsnd syscall for Linux implementation
  Use msgget syscall for Linux implementation
  Add SYSV message queue test
  Consolidate Linux semctl implementation
  Use semget syscall for Linux implementation
  Use semop syscall for Linux implementation
  Consolidate Linux semtimedop implementation
  Add SYSV semaphore test
  Use shmat syscall for Linux implementation
  Consolidate Linux shmctl implementation
  Use shmdt syscall for linux implementation
  Use shmget syscall for linux implementation
  Add SYSV shared memory test

 ChangeLog                                          | 229 +++++++++++++++++++++
 support/check.h                                    |   5 +
 sysdeps/unix/sysv/linux/aarch64/ipc_priv.h         |  32 +++
 sysdeps/unix/sysv/linux/alpha/Makefile             |   3 -
 sysdeps/unix/sysv/linux/alpha/ipc_priv.h           |  33 ++-
 sysdeps/unix/sysv/linux/alpha/kernel-features.h    |   3 +
 sysdeps/unix/sysv/linux/alpha/msgctl.c             |   1 -
 sysdeps/unix/sysv/linux/alpha/semctl.c             |   1 -
 sysdeps/unix/sysv/linux/alpha/shmctl.c             |   1 -
 sysdeps/unix/sysv/linux/alpha/syscalls.list        |  13 --
 sysdeps/unix/sysv/linux/arm/msgctl.c               |  33 ---
 sysdeps/unix/sysv/linux/arm/semctl.c               |  54 -----
 sysdeps/unix/sysv/linux/arm/shmctl.c               |  34 ---
 sysdeps/unix/sysv/linux/arm/syscalls.list          |  12 --
 sysdeps/unix/sysv/linux/generic/syscalls.list      |  14 --
 sysdeps/unix/sysv/linux/hppa/syscalls.list         |  14 --
 sysdeps/unix/sysv/linux/i386/kernel-features.h     |   3 +
 sysdeps/unix/sysv/linux/ia64/syscalls.list         |  14 --
 sysdeps/unix/sysv/linux/ipc_ops.h                  |  30 +++
 sysdeps/unix/sysv/linux/ipc_priv.h                 |  23 +--
 sysdeps/unix/sysv/linux/kernel-features.h          |   4 +
 sysdeps/unix/sysv/linux/m68k/kernel-features.h     |   3 +
 sysdeps/unix/sysv/linux/m68k/semtimedop.S          |  69 -------
 sysdeps/unix/sysv/linux/microblaze/msgctl.c        |   1 -
 sysdeps/unix/sysv/linux/microblaze/semctl.c        |   1 -
 sysdeps/unix/sysv/linux/microblaze/shmctl.c        |   1 -
 sysdeps/unix/sysv/linux/microblaze/syscalls.list   |  12 --
 sysdeps/unix/sysv/linux/mips/ipc_priv.h            |   1 -
 sysdeps/unix/sysv/linux/mips/kernel-features.h     |   2 +
 sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h     |  32 +++
 sysdeps/unix/sysv/linux/mips/mips64/msgctl.c       |  17 +-
 sysdeps/unix/sysv/linux/mips/mips64/semctl.c       |  38 +---
 sysdeps/unix/sysv/linux/mips/mips64/shmctl.c       |  17 +-
 sysdeps/unix/sysv/linux/mips/mips64/syscalls.list  |  13 --
 sysdeps/unix/sysv/linux/msgctl.c                   |  45 ++--
 sysdeps/unix/sysv/linux/msgget.c                   |  11 +-
 sysdeps/unix/sysv/linux/msgrcv.c                   |  26 +--
 sysdeps/unix/sysv/linux/msgsnd.c                   |   9 +-
 sysdeps/unix/sysv/linux/powerpc/ipc_priv.h         |  23 +--
 sysdeps/unix/sysv/linux/powerpc/kernel-features.h  |   3 +
 sysdeps/unix/sysv/linux/s390/kernel-features.h     |   3 +
 sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list |  14 --
 sysdeps/unix/sysv/linux/s390/semtimedop.c          |  12 +-
 sysdeps/unix/sysv/linux/semctl.c                   |  58 +++---
 sysdeps/unix/sysv/linux/semget.c                   |  11 +-
 sysdeps/unix/sysv/linux/semop.c                    |  10 +-
 sysdeps/unix/sysv/linux/semtimedop.c               |  13 +-
 sysdeps/unix/sysv/linux/sh/kernel-features.h       |   3 +
 sysdeps/unix/sysv/linux/shmat.c                    |  17 +-
 sysdeps/unix/sysv/linux/shmctl.c                   |  59 +++---
 sysdeps/unix/sysv/linux/shmdt.c                    |  12 +-
 sysdeps/unix/sysv/linux/shmget.c                   |  13 +-
 sysdeps/unix/sysv/linux/sparc/kernel-features.h    |   3 +
 sysdeps/unix/sysv/linux/sparc/sparc64/ipc_priv.h   |  41 ++++
 sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c     |  32 ---
 sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c     |  54 -----
 sysdeps/unix/sysv/linux/x86_64/ipc_priv.h          |  32 +++
 sysdeps/unix/sysv/linux/x86_64/syscalls.list       |  12 --
 sysvipc/Makefile                                   |   2 +
 sysvipc/test-sysvmsg.c                             | 128 ++++++++++++
 sysvipc/test-sysvsem.c                             | 116 +++++++++++
 sysvipc/test-sysvshm.c                             | 131 ++++++++++++
 62 files changed, 1013 insertions(+), 643 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/ipc_priv.h
 delete mode 100644 sysdeps/unix/sysv/linux/alpha/msgctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/alpha/semctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/alpha/shmctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/arm/msgctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/arm/semctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/arm/shmctl.c
 create mode 100644 sysdeps/unix/sysv/linux/ipc_ops.h
 delete mode 100644 sysdeps/unix/sysv/linux/m68k/semtimedop.S
 delete mode 100644 sysdeps/unix/sysv/linux/microblaze/msgctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/microblaze/semctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/microblaze/shmctl.c
 delete mode 100644 sysdeps/unix/sysv/linux/mips/ipc_priv.h
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h
 delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
 delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
 create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/ipc_priv.h
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/ipc_priv.h
 create mode 100644 sysvipc/test-sysvmsg.c
 create mode 100644 sysvipc/test-sysvsem.c
 create mode 100644 sysvipc/test-sysvshm.c

-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]