From owner-svn-src-all@FreeBSD.ORG Mon Jun 29 18:54:17 2009 Return-Path: <owner-svn-src-all@FreeBSD.ORG> Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 928EA1065692; Mon, 29 Jun 2009 18:54:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 801918FC25; Mon, 29 Jun 2009 18:54:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5TIsHqC056342; Mon, 29 Jun 2009 18:54:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5TIsH4T056338; Mon, 29 Jun 2009 18:54:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906291854.n5TIsH4T056338@svn.freebsd.org> From: Konstantin Belousov <kib@FreeBSD.org> Date: Mon, 29 Jun 2009 18:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195172 - in head/lib/libc: gen sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" <svn-src-all.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all> List-Post: <mailto:svn-src-all@freebsd.org> List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Jun 2009 18:54:19 -0000 Author: kib Date: Mon Jun 29 18:54:17 2009 New Revision: 195172 URL: http://svn.freebsd.org/changeset/base/195172 Log: Make the structure definitions in the man pages match the real code, and remove no longer valid caution. Approved by: re (kensmith) Modified: head/lib/libc/gen/msgctl.3 head/lib/libc/sys/semctl.2 head/lib/libc/sys/shmctl.2 Modified: head/lib/libc/gen/msgctl.3 ============================================================================== --- head/lib/libc/gen/msgctl.3 Mon Jun 29 18:42:54 2009 (r195171) +++ head/lib/libc/gen/msgctl.3 Mon Jun 29 18:54:17 2009 (r195172) @@ -71,12 +71,8 @@ struct msqid_ds { pid_t msg_lspid; /* pid of last msgsnd() */ pid_t msg_lrpid; /* pid of last msgrcv() */ time_t msg_stime; /* time of last msgsnd() */ - long msg_pad1; time_t msg_rtime; /* time of last msgrcv() */ - long msg_pad2; time_t msg_ctime; /* time of last msgctl() */ - long msg_pad3; - long msg_pad4[4]; }; .Ed .Pp @@ -89,11 +85,11 @@ structure is defined in and looks like this: .Bd -literal struct ipc_perm { - unsigned short cuid; /* creator user id */ - unsigned short cgid; /* creator group id */ - unsigned short uid; /* user id */ - unsigned short gid; /* group id */ - unsigned short mode; /* r/w permission */ + 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; /* r/w permission */ unsigned short seq; /* sequence # (to generate unique ipcid) */ key_t key; /* user specified msg/sem/shm key */ }; Modified: head/lib/libc/sys/semctl.2 ============================================================================== --- head/lib/libc/sys/semctl.2 Mon Jun 29 18:42:54 2009 (r195171) +++ head/lib/libc/sys/semctl.2 Mon Jun 29 18:54:17 2009 (r195172) @@ -148,12 +148,9 @@ struct semid_ds { struct sem *sem_base; /* pointer to first semaphore in set */ u_short sem_nsems; /* number of sems in set */ time_t sem_otime; /* last operation time */ - long sem_pad1; /* SVABI/386 says I need this here */ time_t sem_ctime; /* last change time */ /* Times measured in secs since */ /* 00:00:00 GMT, Jan. 1, 1970 */ - long sem_pad2; /* SVABI/386 says I need this here */ - long sem_pad3[4]; /* SVABI/386 says I need this here */ }; .Ed .Sh RETURN VALUES Modified: head/lib/libc/sys/shmctl.2 ============================================================================== --- head/lib/libc/sys/shmctl.2 Mon Jun 29 18:42:54 2009 (r195171) +++ head/lib/libc/sys/shmctl.2 Mon Jun 29 18:54:17 2009 (r195172) @@ -100,14 +100,13 @@ structure is defined as follows: .Bd -literal struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ - int shm_segsz; /* size of segment in bytes */ + size_t shm_segsz; /* size of segment in bytes */ pid_t shm_lpid; /* process ID of last shared memory op */ pid_t shm_cpid; /* process ID of creator */ - short shm_nattch; /* number of current attaches */ + int shm_nattch; /* number of current attaches */ time_t shm_atime; /* time of last shmat() */ time_t shm_dtime; /* time of last shmdt() */ time_t shm_ctime; /* time of last change by shmctl() */ - void *shm_internal; /* sysv stupidity */ }; .Ed .Sh RETURN VALUES @@ -133,16 +132,6 @@ the shared memory segment's owner or cre Permission denied due to mismatch between operation and mode of shared memory segment. .El -.Sh "BUGS" -The segment size has size_t type. -The shm_segsz member of the -.Vt shmid_ds -structure has type int, which is too short to represent the full range -of values for a segment size. -If shared memory limits are raised to allow segments with size > 2 GB -to be created, be aware that IPC_STAT call may return a truncated value -for shm_segsz. -.El .Sh "SEE ALSO" .Xr shmat 2 , .Xr shmdt 2 ,