<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.sem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.sem-release.php',
    1 => 'sem_release',
    2 => 'セマフォを解放する',
  ),
  'up' => 
  array (
    0 => 'ref.sem.php',
    1 => 'セマフォ関数',
  ),
  'prev' => 
  array (
    0 => 'function.sem-get.php',
    1 => 'sem_get',
  ),
  'next' => 
  array (
    0 => 'function.sem-remove.php',
    1 => 'sem_remove',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/sem/functions/sem-release.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.sem-release" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">sem_release</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">sem_release</span> &mdash; <span class="dc-title">セマフォを解放する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.sem-release-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>sem_release</strong></span>(<span class="methodparam"><span class="type"><a href="class.sysvsemaphore.php" class="type SysvSemaphore">SysvSemaphore</a></span> <code class="parameter">$semaphore</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   <span class="function"><strong>sem_release()</strong></span> は、そのセマフォが
   コール元のプロセスにより現在確保されている場合、解放します。
   そうでない場合、警告が表示されます。
  </p>
  <p class="simpara">
   セマフォを解放した後、再び確保するには、<span class="function"><a href="function.sem-acquire.php" class="function">sem_acquire()</a></span>
   をコールします。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.sem-release-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">semaphore</code></dt>
    <dd>
     <span class="simpara">
      <span class="function"><a href="function.sem-get.php" class="function">sem_get()</a></span> が返すセマフォ。
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.sem-release-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   成功した場合に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.sem-release-changelog">
  <h3 class="title">変更履歴</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>バージョン</th>
      <th>説明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       引数 <code class="parameter">semaphore</code> は、
       <span class="classname"><a href="class.sysvsemaphore.php" class="classname">SysvSemaphore</a></span> クラスのインスタンスを期待するようになりました。
       これより前のバージョンでは、リソースが期待されていました。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.sem-release-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.sem-get.php" class="function" rel="rdfs-seeAlso">sem_get()</a> - セマフォ ID を得る</span></li>
   <li><span class="function"><a href="function.sem-acquire.php" class="function" rel="rdfs-seeAlso">sem_acquire()</a> - セマフォを得る</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>