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 ,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to