⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.sem-get.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Get a semaphore id</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sem-acquire.html">sem_acquire</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sem-release.html">sem_release</a></div> <div class="up"><a href="ref.sem.html">Semaphore Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.sem-get" class="refentry"> <div class="refnamediv">  <h1 class="refname">sem_get</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">sem_get</span> &mdash; <span class="dc-title">Get a semaphore id</span></p> </div>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">resource</span> <span class="methodname"><b><b>sem_get</b></b></span>    ( <span class="methodparam"><span class="type">int</span> <tt class="parameter">$key</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$max_acquire</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$perm</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$auto_release</tt></span>  ]]] )</div>  <p class="para rdfs-comment">   <b>sem_get()</b> returns an id that can be used to   access the System V semaphore with the given <i><tt class="parameter">key</tt></i>.  </p>  <p class="para">   A second call to <b>sem_get()</b> for the same key   will return a different semaphore identifier, but both   identifiers access the same underlying semaphore.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">key</tt></i></span>     <dd>      <p class="para">      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">max_acquire</tt></i></span>     <dd>      <p class="para">       The number of processes that can acquire the semaphore simultaneously       is set to <i><tt class="parameter">max_acquire</tt></i> (defaults to 1).      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">perm</tt></i></span>     <dd>      <p class="para">       The semaphore permissions. Defaults to 0666. Actually this value is       set only if the process finds it is the only process currently       attached to the semaphore.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">auto_release</tt></i></span>     <dd>      <p class="para">       Specifies if the semaphore should be automatically released on request       shutdown.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns a positive semaphore identifier on success, or <b><tt>FALSE</tt></b> on   error.  </p> </div> <div class="refsect1 changelog">  <h3 class="title">ChangeLog</h3>  <p class="para">   <table class="informaltable">    <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Version</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">4.3.0</td>       <td colspan="1" rowspan="1" align="left">        The <i><tt class="parameter">auto_release</tt></i> parameter was added.       </td>      </tr>     </tbody>    </colgroup>   </table>  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.sem-acquire.html" class="function" rel="rdfs-seeAlso">sem_acquire()</a></li>    <li class="member"><a href="function.sem-release.html" class="function" rel="rdfs-seeAlso">sem_release()</a></li>    <li class="member"><a href="function.ftok.html" class="function" rel="rdfs-seeAlso">ftok()</a></li>   </ul>  </p> </div>  </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sem-acquire.html">sem_acquire</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sem-release.html">sem_release</a></div> <div class="up"><a href="ref.sem.html">Semaphore Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -