summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/bits/shm.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-14 07:41:08 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-14 07:41:08 +0000
commita5cc55111f77315fc7e04613772237b52a3dbfdf (patch)
treeea62d66b343dbc91de8ab529c8983021a18eda7d /libc/sysdeps/linux/sparc/bits/shm.h
parentc4990c6859a4caab9710a07a0c9052c57a1d11d4 (diff)
Sync up sparc headers
Diffstat (limited to 'libc/sysdeps/linux/sparc/bits/shm.h')
-rw-r--r--libc/sysdeps/linux/sparc/bits/shm.h60
1 files changed, 38 insertions, 22 deletions
diff --git a/libc/sysdeps/linux/sparc/bits/shm.h b/libc/sysdeps/linux/sparc/bits/shm.h
index c7070595b..ea19b6845 100644
--- a/libc/sysdeps/linux/sparc/bits/shm.h
+++ b/libc/sysdeps/linux/sparc/bits/shm.h
@@ -1,26 +1,27 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SHM_H
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
+#include <bits/wordsize.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -36,20 +37,31 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
- int shm_segsz; /* size of segment in bytes */
+#if __WORDSIZE == 32
+ unsigned int __pad1;
+#endif
__time_t shm_atime; /* time of last shmat() */
+#if __WORDSIZE == 32
+ unsigned int __pad2;
+#endif
__time_t shm_dtime; /* time of last shmdt() */
+#if __WORDSIZE == 32
+ unsigned int __pad3;
+#endif
__time_t shm_ctime; /* time of last change by shmctl() */
- __ipc_pid_t shm_cpid; /* pid of creator */
- __ipc_pid_t shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
- unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__attaches; /* descriptors for attaches */
+ size_t shm_segsz; /* size of segment in bytes */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
};
#ifdef __USE_MISC
@@ -64,11 +76,15 @@ struct shmid_ds
struct shminfo
{
- int shmmax;
- int shmmin;
- int shmmni;
- int shmseg;
- int shmall;
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
};
struct shm_info