|
@@ -1,4 +1,4 @@
|
|
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
|
|
+/* Copyright (C) 1995,1996,1997,2000,2002,2004 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
@@ -41,26 +41,27 @@ __BEGIN_DECLS
|
|
#define SHMLBA (__getpagesize ())
|
|
#define SHMLBA (__getpagesize ())
|
|
extern int __getpagesize (void) __THROW __attribute__ ((__const__));
|
|
extern int __getpagesize (void) __THROW __attribute__ ((__const__));
|
|
|
|
|
|
-__END_DECLS
|
|
|
|
-
|
|
|
|
|
|
|
|
/* Type to count number of attaches. */
|
|
/* Type to count number of attaches. */
|
|
-typedef unsigned short shmatt_t;
|
|
+typedef unsigned long int shmatt_t;
|
|
|
|
|
|
/* Data structure describing a set of semaphores. */
|
|
/* Data structure describing a set of semaphores. */
|
|
-struct shmid_ds {
|
|
+struct shmid_ds
|
|
- struct ipc_perm shm_perm; /* operation perms */
|
|
+ {
|
|
- int shm_segsz; /* size of segment (bytes) */
|
|
+ struct ipc_perm shm_perm; /* operation permission struct */
|
|
- __kernel_time_t shm_atime; /* last attach time */
|
|
+ size_t shm_segsz; /* size of segment in bytes */
|
|
- __kernel_time_t shm_dtime; /* last detach time */
|
|
+ __time_t shm_atime; /* time of last shmat() */
|
|
- __kernel_time_t shm_ctime; /* last change time */
|
|
+ unsigned long int __unused1;
|
|
- __kernel_ipc_pid_t shm_cpid; /* pid of creator */
|
|
+ __time_t shm_dtime; /* time of last shmdt() */
|
|
- __kernel_ipc_pid_t shm_lpid; /* pid of last operator */
|
|
+ unsigned long int __unused2;
|
|
- unsigned short shm_nattch; /* no. of current attaches */
|
|
+ __time_t shm_ctime; /* time of last change by shmctl() */
|
|
- unsigned short shm_unused; /* compatibility */
|
|
+ unsigned long int __unused3;
|
|
- void *shm_unused2; /* ditto - used by DIPC */
|
|
+ __pid_t shm_cpid; /* pid of creator */
|
|
- void *shm_unused3; /* unused */
|
|
+ __pid_t shm_lpid; /* pid of last shmop */
|
|
-};
|
|
+ shmatt_t shm_nattch; /* number of current attaches */
|
|
|
|
+ unsigned long int __unused4;
|
|
|
|
+ unsigned long int __unused5;
|
|
|
|
+ };
|
|
|
|
|
|
#ifdef __USE_MISC
|
|
#ifdef __USE_MISC
|
|
|
|
|
|
@@ -73,21 +74,29 @@ struct shmid_ds {
|
|
# define SHM_LOCKED 02000 /* segment will not be swapped */
|
|
# define SHM_LOCKED 02000 /* segment will not be swapped */
|
|
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
|
|
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
|
|
|
|
|
|
-struct shminfo {
|
|
+struct shminfo
|
|
- int shmmax;
|
|
+ {
|
|
- int shmmin;
|
|
+ unsigned long int shmmax;
|
|
- int shmmni;
|
|
+ unsigned long int shmmin;
|
|
- int shmseg;
|
|
+ unsigned long int shmmni;
|
|
- int shmall;
|
|
+ unsigned long int shmseg;
|
|
-};
|
|
+ unsigned long int shmall;
|
|
-
|
|
+ unsigned long int __unused1;
|
|
-struct shm_info {
|
|
+ unsigned long int __unused2;
|
|
|
|
+ unsigned long int __unused3;
|
|
|
|
+ unsigned long int __unused4;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+struct shm_info
|
|
|
|
+ {
|
|
int used_ids;
|
|
int used_ids;
|
|
- unsigned long shm_tot; /* total allocated shm */
|
|
+ unsigned long int shm_tot; /* total allocated shm */
|
|
- unsigned long shm_rss; /* total resident shm */
|
|
+ unsigned long int shm_rss; /* total resident shm */
|
|
- unsigned long shm_swp; /* total swapped shm */
|
|
+ unsigned long int shm_swp; /* total swapped shm */
|
|
- unsigned long swap_attempts;
|
|
+ unsigned long int swap_attempts;
|
|
- unsigned long swap_successes;
|
|
+ unsigned long int swap_successes;
|
|
-};
|
|
+ };
|
|
|
|
|
|
#endif /* __USE_MISC */
|
|
#endif /* __USE_MISC */
|
|
|
|
+
|
|
|
|
+__END_DECLS
|