📄 sysshm.h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title><sys/shm.h></title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_009_342"> </a>NAME</h4><blockquote>sys/shm.h - shared memory facility</blockquote><h4><a name = "tag_000_009_343"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <sys/shm.h></code></pre></blockquote><h4><a name = "tag_000_009_344"> </a>DESCRIPTION</h4><blockquote>The <<b>sys/shm.h</b>> header defines the following symbolic constants andstructure:<p>Symbolic constants:<dl compact><dt>SHM_RDONLY<dd>Attach read-only (else read-write).<dt>SHMLBA<dd>Segment low boundary address multiple.<dt>SHM_RND<dd>Round attach address to SHMLBA.</dl><p>The following data types are defined through<b>typedef</b>:<dl compact><dt><b>shmatt_t</b><dd><index term="data type, shmatt_t"></index>Unsigned integer used for the number of current attaches that must be ableto store values at least as large as a type<b>unsigned short</b>.</dl><p>The structure<b>shmid_ds</b>contains the following members:<pre><code>struct ipc_perm shm_perm operation permission structuresize_t shm_segsz size of segment in bytespid_t shm_lpid process ID of last shared memory operationpid_t shm_cpid process ID of creatorshmatt_t shm_nattch number of current attachestime_t shm_atime time of last <i>shmat</i>()time_t shm_dtime time of last <i>shmdt</i>()time_t shm_ctime time of last change by <i>shmctl</i>()</code></pre><p>The<b>pid_t</b>,<b>time_t</b>,<b>key_t</b>and<b>size_t</b>types are defined as described in<i><a href="systypes.h.html"><sys/types.h></a></i>.The following are declared as functions and may also be definedas macros.Function prototypes must be provided for use with an ISO Ccompiler.<pre><code>void *<a href="shmat.html">shmat</a>(int, const void *, int);int <a href="shmctl.html">shmctl</a>(int, int, struct shmid_ds *);int <a href="shmdt.html">shmdt</a>(const void *);int <a href="shmget.html">shmget</a>(key_t, size_t, int);</code></pre><p>In addition, all of the symbols from<i><a href="sysipc.h.html"><sys/ipc.h></a></i>will be defined when this header is included.</blockquote><h4><a name = "tag_000_009_345"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_009_346"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_009_347"> </a>SEE ALSO</h4><blockquote><i><a href="shmat.html">shmat()</a></i>,<i><a href="shmctl.html">shmctl()</a></i>,<i><a href="shmdt.html">shmdt()</a></i>,<i><a href="shmget.html">shmget()</a></i>,<i><a href="systypes.h.html"><sys/types.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -