Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/include/cygwin/shm.h')
-rw-r--r--winsup/cygwin/include/cygwin/shm.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/winsup/cygwin/include/cygwin/shm.h b/winsup/cygwin/include/cygwin/shm.h
index 2c882012c..c58599379 100644
--- a/winsup/cygwin/include/cygwin/shm.h
+++ b/winsup/cygwin/include/cygwin/shm.h
@@ -1,6 +1,6 @@
/* sys/shm.h
- Copyright 2001, 2002 Red Hat Inc.
+ Copyright 2001, 2002, 2012, 2013 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -40,12 +40,12 @@ extern "C"
/* Unsigned integer used for the number of current attaches.
*/
-typedef unsigned int shmatt_t;
+typedef uint32_t shmatt_t;
struct shmid_ds
{
struct ipc_perm shm_perm; /* Operation permission structure. */
- size_t shm_segsz; /* Size of segment in bytes. */
+ uint32_t shm_segsz; /* Size of segment in bytes. */
pid_t shm_lpid; /* Process ID of last operation. */
pid_t shm_cpid; /* Process ID of creator. */
shmatt_t shm_nattch;/* Number of current attaches. */
@@ -69,17 +69,20 @@ struct shmid_ds
*/
struct shminfo
{
- long shmmax; /* Maximum size in bytes of a shared
+ int32_t shmmax; /* Maximum size in bytes of a shared
memory segment. */
- long shmmin; /* Minimum size in bytes of a shared
+ int32_t shmmin; /* Minimum size in bytes of a shared
memory segment. */
- long shmmni; /* Maximum number of shared memory
+ int32_t shmmni; /* Maximum number of shared memory
segments, system wide. */
- long shmseg; /* Maximum number of shared memory
+ int32_t shmseg; /* Maximum number of shared memory
segments attached per process. */
- long shmall; /* Maximum number of bytes of shared
- memory, system wide. */
- long shm_spare[4];
+ int32_t shmall; /* Maximum number of bytes of shared
+ memory, system wide.
+ Note that XSI IPC shared memory allocation is
+ restricted to a bit less than 2 Gigs, even on
+ 64 bit, so using an int32_t here is sufficient. */
+ int32_t shm_spare[4];
};
/* Buffer type for shmctl (SHM_INFO, ...) as used by ipcs(8).
@@ -87,9 +90,9 @@ struct shminfo
struct shm_info
{
#define shm_ids used_ids
- long used_ids; /* Number of allocated segments. */
- long shm_tot; /* Size in bytes of allocated segments. */
- long shm_atts; /* Number of attached segments, system
+ int32_t used_ids; /* Number of allocated segments. */
+ int32_t shm_tot; /* Size in bytes of allocated segments. */
+ int32_t shm_atts; /* Number of attached segments, system
wide. */
};
#endif /* _KERNEL */