<HTML ><HEAD ><TITLE >sem_release</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK REL="HOME" TITLE="PHP Manual" HREF="manual.html"><LINK REL="UP" TITLE="Semaphore and shared memory functions" HREF="ref.sem.html"><LINK REL="PREVIOUS" TITLE="sem_acquire" HREF="function.sem-acquire.html"><LINK REL="NEXT" TITLE="shm_attach" HREF="function.shm-attach.html"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.sem-acquire.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.shm-attach.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.sem-release" >sem_release</A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN24862" ></A >sem_release -- release a semaphore</DIV ><DIV CLASS="refsect1" ><A NAME="AEN24865" ></A ><H2 >Description</H2 ><DIV CLASS="funcsynopsis" ><P ></P ><CODE CLASS="FUNCDEF" >int sem_release</CODE >(int sem_identifier);<P ></P ></DIV ><P > Returns: true on success, false on error</P ><P > <B CLASS="function" >sem_release()</B > releases the semaphore if it is currently acquired by the calling process, otherwise a warning is generated.</P ><P > After releasing the semaphore, <A HREF="function.sem-acquire.html" ><B CLASS="function" >sem_acquire()</B ></A > may be called to re-acquire it.</P ><P > See also: <A HREF="function.sem-get.html" ><B CLASS="function" >sem_get()</B ></A > and <A HREF="function.sem-acquire.html" ><B CLASS="function" >sem_acquire()</B ></A >.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.sem-acquire.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="manual.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.shm-attach.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >sem_acquire</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.sem.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >shm_attach</TD ></TR ></TABLE ></DIV ></BODY ></HTML >