Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys Update for XSH5.
details: https://anonhg.NetBSD.org/src/rev/906cd1357a87
branches: trunk
changeset: 475799:906cd1357a87
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Aug 25 21:12:54 1999 +0000
description:
Update for XSH5.
diffstat:
lib/libc/sys/shmat.2 | 16 ++++++++--
lib/libc/sys/shmctl.2 | 71 ++++++++++++++++++++++----------------------------
lib/libc/sys/shmget.2 | 16 +++++++---
3 files changed, 54 insertions(+), 49 deletions(-)
diffs (191 lines):
diff -r 9abe55be2441 -r 906cd1357a87 lib/libc/sys/shmat.2
--- a/lib/libc/sys/shmat.2 Wed Aug 25 21:05:21 1999 +0000
+++ b/lib/libc/sys/shmat.2 Wed Aug 25 21:12:54 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: shmat.2,v 1.8 1999/03/22 19:45:09 garbled Exp $
+.\" $NetBSD: shmat.2,v 1.9 1999/08/25 21:12:54 thorpej Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -29,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 17, 1995
+.Dd August 25, 1999
.Dt SHMAT 2
.Os
.Sh NAME
@@ -37,8 +37,6 @@
.Nm shmdt
.Nd map/unmap shared memory
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
.Fd #include <sys/shm.h>
.Ft void *
.Fn shmat "int shmid" "const void *shmaddr" "int shmflg"
@@ -123,3 +121,13 @@
.Xr mmap 2 ,
.Xr shmctl 2 ,
.Xr shmget 2
+.Sh STANDARDS
+The
+.Nm shmat
+and
+.Nm shmdt
+system calls conform to
+.St -xsh5 .
+.Sh HISTORY
+Shared memory segments appeared in the first release of
+.At V .
diff -r 9abe55be2441 -r 906cd1357a87 lib/libc/sys/shmctl.2
--- a/lib/libc/sys/shmctl.2 Wed Aug 25 21:05:21 1999 +0000
+++ b/lib/libc/sys/shmctl.2 Wed Aug 25 21:12:54 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: shmctl.2,v 1.7 1999/03/22 19:45:09 garbled Exp $
+.\" $NetBSD: shmctl.2,v 1.8 1999/08/25 21:12:54 thorpej Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -29,67 +29,50 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 17, 1995
+.Dd August 25, 1999
.Dt SHMCTL 2
.Os
.Sh NAME
.Nm shmctl
.Nd shared memory control operations
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
.Fd #include <sys/shm.h>
.Ft int
.Fn shmctl "int shmid" "int cmd" "struct shmid_ds *buf"
.Sh DESCRIPTION
The
.Fn shmctl
-system call performs some control operations on the shared memory area
+system call performs control operations on the shared memory segment
specified by
.Fa shmid .
.Pp
-Each shared memory segment has a data structure associated with it,
-parts of which may be altered by
-.Fn shmctl
-and parts of which determine the actions of
-.Fn shmctl .
-.Pp
-This structure is defined as follows in
-.Aq Pa sys/shm.h :
+Each shared memory segment has a
+.Sy shmid_ds
+structure associated with it which contains the following members:
.Bd -literal
-struct shmid_ds {
- struct ipc_perm shm_perm; /* operation permissions */
- int shm_segsz; /* size of segment in bytes */
- pid_t shm_lpid; /* pid of last shm op */
- pid_t shm_cpid; /* pid of creator */
- short shm_nattch; /* # of current attaches */
- time_t shm_atime; /* last shmat() time*/
- time_t shm_dtime; /* last shmdt() time */
- time_t shm_ctime; /* last change by shmctl() */
- void *shm_internal; /* sysv stupidity */
-};
+ struct ipc_perm shm_perm; /* operation permissions */
+ size_t shm_segsz; /* size of segment in bytes */
+ pid_t shm_lpid; /* pid of last shm op */
+ pid_t shm_cpid; /* pid of creator */
+ shmatt_t shm_nattch; /* # of current attaches */
+ time_t shm_atime; /* last shmat() time*/
+ time_t shm_dtime; /* last shmdt() time */
+ time_t shm_ctime; /* last change by shmctl() */
.Ed
+.Pp
The
-.Bf -literal
-ipc_perm
-.Ef
+.Sy ipc_perm
structure used inside the
-.Bf -literal
-shmid_ds
-.Ef
+.Sy shmid_ds
structure is defined in
.Aq Pa sys/ipc.h
-and looks like this:
+and contains the following members:
.Bd -literal
-struct ipc_perm {
- ushort cuid; /* creator user id */
- ushort cgid; /* creator group id */
- ushort uid; /* user id */
- ushort gid; /* group id */
- ushort mode; /* r/w permission (see chmod(2)) */
- ushort seq; /* sequence # (to generate unique msg/sem/shm id) */
- key_t key; /* user specified msg/sem/shm key */
-};
+ uid_t cuid; /* creator user id */
+ gid_t cgid; /* creator group id */
+ uid_t uid; /* user id */
+ gid_t gid; /* group id */
+ mode_t mode; /* permission (lower 9 bits) */
.Ed
.Pp
The operation to be performed by
@@ -189,3 +172,11 @@
.Sh SEE ALSO
.Xr shmat 2 ,
.Xr shmget 2
+.Sh STANDARDS
+The
+.Nm
+system call conforms to
+.St -xsh5 .
+.Sh HISTORY
+Shared memory segments appeared in the first release of
+.At V .
diff -r 9abe55be2441 -r 906cd1357a87 lib/libc/sys/shmget.2
--- a/lib/libc/sys/shmget.2 Wed Aug 25 21:05:21 1999 +0000
+++ b/lib/libc/sys/shmget.2 Wed Aug 25 21:12:54 1999 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: shmget.2,v 1.6 1999/03/22 19:45:09 garbled Exp $
+.\" $NetBSD: shmget.2,v 1.7 1999/08/25 21:12:54 thorpej Exp $
.\"
.\" Copyright (c) 1995 Frank van der Linden
.\" All rights reserved.
@@ -29,15 +29,13 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 17, 1995
+.Dd August 25, 1999
.Dt SHMGET 2
.Os
.Sh NAME
.Nm shmget
-.Nd get shared memory area identifier
+.Nd get shared memory segment
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
.Fd #include <sys/shm.h>
.Ft int
.Fn shmget "key_t key" "size_t size" "int shmflg"
@@ -132,3 +130,11 @@
.Xr mmap 2 ,
.Xr shmat 2 ,
.Xr shmctl 2
+.Sh STANDARDS
+The
+.Nm
+system call conforms to
+.St -xsh5 .
+.Sh HISTORY
+Shared memory segments appeared in the first release of
+.At V .
Home |
Main Index |
Thread Index |
Old Index