Add shared memory initializatin logic

This commit is contained in:
Gregory Nutt 2014-09-23 08:46:31 -06:00
parent 744aafdddc
commit 5f66889a21
1 changed files with 11 additions and 5 deletions

View File

@ -9085,11 +9085,6 @@ int shmget(key_t key, size_t size, int shmflg);
Upon creation, the data structure associated with the new shared memory identifier will be initialized as follows:
</p>
<ul>
<li>
<p>
The values of <code>shm_perm.cuid</code>, <code>shm_perm.uid</code>, <code>shm_perm.cgid</code>, and <code>shm_perm.gid</code> are set equal to the effective user ID and effective group ID, respectively, of the calling process.
</p>
</li>
<li>
<p>
The low-order nine bits of <code>shm_perm.mode</code> are set equal to the low-order nine bits of <code>shmflg</code>.
@ -9162,6 +9157,17 @@ int shmget(key_t key, size_t size, int shmflg);
A shared memory identifier is to be created, but the system-imposed limit on the maximum number of allowed shared memory identifiers system-wide would be exceeded.
</li>
</ul>
<p>
<b>POSIX Deviations</b>
<p>
<ul>
<li>
<p>
The values of <code>shm_perm.cuid</code>, <code>shm_perm.uid</code>, <code>shm_perm.cgid</code>, and <code>shm_perm.gid</code> should be set equal to the effective user ID and effective group ID, respectively, of the calling process.
The NuttX <code>ipc_perm</code> structure, however, does not support these fields because user and group IDs are not yet supported by NuttX.
</p>
</li>
</ul>
<h3><a name="shmat">2.12.2 <code>shmat</code></a></h3>
<p>