Deleted Added
full compact
shm.h (189814) shm.h (194910)
1/* $FreeBSD: head/sys/sys/shm.h 189814 2009-03-14 19:06:52Z das $ */
1/* $FreeBSD: head/sys/sys/shm.h 194910 2009-06-24 21:10:52Z jhb $ */
2/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
3
4/*-
5 * Copyright (c) 1994 Adam Glass
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 60 unchanged lines hidden (view full) ---

70#define _TIME_T_DECLARED
71#endif
72
73#ifndef _SIZE_T_DECLARED
74typedef __size_t size_t;
75#define _SIZE_T_DECLARED
76#endif
77
2/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
3
4/*-
5 * Copyright (c) 1994 Adam Glass
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 60 unchanged lines hidden (view full) ---

70#define _TIME_T_DECLARED
71#endif
72
73#ifndef _SIZE_T_DECLARED
74typedef __size_t size_t;
75#define _SIZE_T_DECLARED
76#endif
77
78struct shmid_ds {
79 struct ipc_perm shm_perm; /* operation permission structure */
78#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
79 defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
80struct shmid_ds_old {
81 struct ipc_perm_old shm_perm; /* operation permission structure */
80 int shm_segsz; /* size of segment in bytes */
81 pid_t shm_lpid; /* process ID of last shared memory op */
82 pid_t shm_cpid; /* process ID of creator */
83 short shm_nattch; /* number of current attaches */
84 time_t shm_atime; /* time of last shmat() */
85 time_t shm_dtime; /* time of last shmdt() */
86 time_t shm_ctime; /* time of last change by shmctl() */
87 void *shm_internal; /* sysv stupidity */
88};
82 int shm_segsz; /* size of segment in bytes */
83 pid_t shm_lpid; /* process ID of last shared memory op */
84 pid_t shm_cpid; /* process ID of creator */
85 short shm_nattch; /* number of current attaches */
86 time_t shm_atime; /* time of last shmat() */
87 time_t shm_dtime; /* time of last shmdt() */
88 time_t shm_ctime; /* time of last change by shmctl() */
89 void *shm_internal; /* sysv stupidity */
90};
91#endif
89
92
93struct shmid_ds {
94 struct ipc_perm shm_perm; /* operation permission structure */
95 size_t shm_segsz; /* size of segment in bytes */
96 pid_t shm_lpid; /* process ID of last shared memory op */
97 pid_t shm_cpid; /* process ID of creator */
98 int shm_nattch; /* number of current attaches */
99 time_t shm_atime; /* time of last shmat() */
100 time_t shm_dtime; /* time of last shmdt() */
101 time_t shm_ctime; /* time of last change by shmctl() */
102};
103
90#ifdef _KERNEL
104#ifdef _KERNEL
105#include <vm/vm.h>
91
92/*
93 * System 5 style catch-all structure for shared memory constants that
94 * might be of interest to user programs. Do we really want/need this?
95 */
96struct shminfo {
97 u_long shmmax; /* max shared memory segment size (bytes) */
98 u_long shmmin; /* max shared memory segment size (bytes) */
99 u_long shmmni; /* max number of shared memory identifiers */
100 u_long shmseg; /* max shared memory segments per process */
101 u_long shmall; /* max amount of shared memory (pages) */
102};
103
104/*
105 * Add a kernel wrapper to the shmid_ds struct so that private info (like the
106 * MAC label) can be added to it, without changing the user interface.
107 */
108struct shmid_kernel {
109 struct shmid_ds u;
106
107/*
108 * System 5 style catch-all structure for shared memory constants that
109 * might be of interest to user programs. Do we really want/need this?
110 */
111struct shminfo {
112 u_long shmmax; /* max shared memory segment size (bytes) */
113 u_long shmmin; /* max shared memory segment size (bytes) */
114 u_long shmmni; /* max number of shared memory identifiers */
115 u_long shmseg; /* max shared memory segments per process */
116 u_long shmall; /* max amount of shared memory (pages) */
117};
118
119/*
120 * Add a kernel wrapper to the shmid_ds struct so that private info (like the
121 * MAC label) can be added to it, without changing the user interface.
122 */
123struct shmid_kernel {
124 struct shmid_ds u;
125 vm_object_t object;
110 struct label *label; /* MAC label */
126 struct label *label; /* MAC label */
111 size_t shm_bsegsz;
112};
113
114extern struct shminfo shminfo;
115
116struct shm_info {
117 int used_ids;
118 unsigned long shm_tot;
119 unsigned long shm_rss;

--- 33 unchanged lines hidden ---
127};
128
129extern struct shminfo shminfo;
130
131struct shm_info {
132 int used_ids;
133 unsigned long shm_tot;
134 unsigned long shm_rss;

--- 33 unchanged lines hidden ---