Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > a41e5ac5fb332416cb8019ae392f1f99 > files > 322

lib64pulseaudio-devel-10.0-1.1.mga6.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PulseAudio: thread-mainloop.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PulseAudio
   &#160;<span id="projectnumber">10.0.0-1.1.mga6</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('thread-mainloop_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">thread-mainloop.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A thread based event loop implementation based on pa_mainloop.  
<a href="#details">More...</a></p>

<p><a href="thread-mainloop_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a40393b9b64dc8213bcd5f017344baf74"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a></td></tr>
<tr class="memdesc:a40393b9b64dc8213bcd5f017344baf74"><td class="mdescLeft">&#160;</td><td class="mdescRight">An opaque threaded main loop object.  <a href="#a40393b9b64dc8213bcd5f017344baf74">More...</a><br /></td></tr>
<tr class="separator:a40393b9b64dc8213bcd5f017344baf74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3b8bf5f49d7eb9d6fe6ea008eb6482f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a3b8bf5f49d7eb9d6fe6ea008eb6482f2">pa_threaded_mainloop_new</a> (void)</td></tr>
<tr class="memdesc:a3b8bf5f49d7eb9d6fe6ea008eb6482f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a new threaded main loop object.  <a href="#a3b8bf5f49d7eb9d6fe6ea008eb6482f2">More...</a><br /></td></tr>
<tr class="separator:a3b8bf5f49d7eb9d6fe6ea008eb6482f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00afff8173668f12e19d574cd4e4134b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a00afff8173668f12e19d574cd4e4134b">pa_threaded_mainloop_free</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a00afff8173668f12e19d574cd4e4134b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a threaded main loop object.  <a href="#a00afff8173668f12e19d574cd4e4134b">More...</a><br /></td></tr>
<tr class="separator:a00afff8173668f12e19d574cd4e4134b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2faf4ddb9a94f74d6e7ef80843e73d30"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a2faf4ddb9a94f74d6e7ef80843e73d30">pa_threaded_mainloop_start</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a2faf4ddb9a94f74d6e7ef80843e73d30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the event loop thread.  <a href="#a2faf4ddb9a94f74d6e7ef80843e73d30">More...</a><br /></td></tr>
<tr class="separator:a2faf4ddb9a94f74d6e7ef80843e73d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a017a59832e81a44aa8989c403fb70e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a2a017a59832e81a44aa8989c403fb70e">pa_threaded_mainloop_stop</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a2a017a59832e81a44aa8989c403fb70e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminate the event loop thread cleanly.  <a href="#a2a017a59832e81a44aa8989c403fb70e">More...</a><br /></td></tr>
<tr class="separator:a2a017a59832e81a44aa8989c403fb70e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fd002f510ed24cabacb63a26bf4c977"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a2fd002f510ed24cabacb63a26bf4c977">pa_threaded_mainloop_lock</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a2fd002f510ed24cabacb63a26bf4c977"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the event loop object, effectively blocking the event loop thread from processing events.  <a href="#a2fd002f510ed24cabacb63a26bf4c977">More...</a><br /></td></tr>
<tr class="separator:a2fd002f510ed24cabacb63a26bf4c977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2b2beaa3a66135da67d61db211f0829"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#ab2b2beaa3a66135da67d61db211f0829">pa_threaded_mainloop_unlock</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:ab2b2beaa3a66135da67d61db211f0829"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock the event loop object, inverse of <a class="el" href="thread-mainloop_8h.html#a2fd002f510ed24cabacb63a26bf4c977" title="Lock the event loop object, effectively blocking the event loop thread from processing events...">pa_threaded_mainloop_lock()</a>.  <a href="#ab2b2beaa3a66135da67d61db211f0829">More...</a><br /></td></tr>
<tr class="separator:ab2b2beaa3a66135da67d61db211f0829"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac96d19260567d0406350f1b3a14c4bed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#ac96d19260567d0406350f1b3a14c4bed">pa_threaded_mainloop_wait</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:ac96d19260567d0406350f1b3a14c4bed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for an event to be signalled by the event loop thread.  <a href="#ac96d19260567d0406350f1b3a14c4bed">More...</a><br /></td></tr>
<tr class="separator:ac96d19260567d0406350f1b3a14c4bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad253b70911af81c04417793841a15766"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#ad253b70911af81c04417793841a15766">pa_threaded_mainloop_signal</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m, int wait_for_accept)</td></tr>
<tr class="memdesc:ad253b70911af81c04417793841a15766"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal all threads waiting for a signalling event in <a class="el" href="thread-mainloop_8h.html#ac96d19260567d0406350f1b3a14c4bed" title="Wait for an event to be signalled by the event loop thread. ">pa_threaded_mainloop_wait()</a>.  <a href="#ad253b70911af81c04417793841a15766">More...</a><br /></td></tr>
<tr class="separator:ad253b70911af81c04417793841a15766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a254b0862e30845a4b0427a7a74b3db91"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a254b0862e30845a4b0427a7a74b3db91">pa_threaded_mainloop_accept</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a254b0862e30845a4b0427a7a74b3db91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept a signal from the event thread issued with <a class="el" href="thread-mainloop_8h.html#ad253b70911af81c04417793841a15766" title="Signal all threads waiting for a signalling event in pa_threaded_mainloop_wait(). ...">pa_threaded_mainloop_signal()</a>.  <a href="#a254b0862e30845a4b0427a7a74b3db91">More...</a><br /></td></tr>
<tr class="separator:a254b0862e30845a4b0427a7a74b3db91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a487aaf9946ccddbd54c68a6c3fb3fe39"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a487aaf9946ccddbd54c68a6c3fb3fe39">pa_threaded_mainloop_get_retval</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a487aaf9946ccddbd54c68a6c3fb3fe39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the return value as specified with the main loop's <a class="el" href="mainloop_8h.html#a3000eb1bacba8773424a779cbbb12572" title="Shutdown the main loop with the specified return value. ">pa_mainloop_quit()</a> routine.  <a href="#a487aaf9946ccddbd54c68a6c3fb3fe39">More...</a><br /></td></tr>
<tr class="separator:a487aaf9946ccddbd54c68a6c3fb3fe39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab3c05099eafa9947aa7894af2f79fda"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structpa__mainloop__api.html">pa_mainloop_api</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#aab3c05099eafa9947aa7894af2f79fda">pa_threaded_mainloop_get_api</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:aab3c05099eafa9947aa7894af2f79fda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the main loop abstraction layer vtable for this main loop.  <a href="#aab3c05099eafa9947aa7894af2f79fda">More...</a><br /></td></tr>
<tr class="separator:aab3c05099eafa9947aa7894af2f79fda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a5f04b51cc3011de90e1490c8baacd0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#a7a5f04b51cc3011de90e1490c8baacd0">pa_threaded_mainloop_in_thread</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m)</td></tr>
<tr class="memdesc:a7a5f04b51cc3011de90e1490c8baacd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns non-zero when called from within the event loop thread.  <a href="#a7a5f04b51cc3011de90e1490c8baacd0">More...</a><br /></td></tr>
<tr class="separator:a7a5f04b51cc3011de90e1490c8baacd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab44d948b5091a906640e4b33ee3d0983"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread-mainloop_8h.html#ab44d948b5091a906640e4b33ee3d0983">pa_threaded_mainloop_set_name</a> (<a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *m, const char *name)</td></tr>
<tr class="memdesc:ab44d948b5091a906640e4b33ee3d0983"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name of the thread.  <a href="#ab44d948b5091a906640e4b33ee3d0983">More...</a><br /></td></tr>
<tr class="separator:ab44d948b5091a906640e4b33ee3d0983"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A thread based event loop implementation based on pa_mainloop. </p>
<p>The event loop is run in a helper thread in the background. A few synchronization primitives are available to access the objects attached to the event loop safely.</p>
<p>See also <a class="el" href="threaded_mainloop.html">Threaded Main Loop</a> </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a40393b9b64dc8213bcd5f017344baf74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40393b9b64dc8213bcd5f017344baf74">&#9670;&nbsp;</a></span>pa_threaded_mainloop</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> <a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>An opaque threaded main loop object. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a254b0862e30845a4b0427a7a74b3db91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a254b0862e30845a4b0427a7a74b3db91">&#9670;&nbsp;</a></span>pa_threaded_mainloop_accept()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_accept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept a signal from the event thread issued with <a class="el" href="thread-mainloop_8h.html#ad253b70911af81c04417793841a15766" title="Signal all threads waiting for a signalling event in pa_threaded_mainloop_wait(). ...">pa_threaded_mainloop_signal()</a>. </p>
<p>This call should only be used in conjunction with <a class="el" href="thread-mainloop_8h.html#ad253b70911af81c04417793841a15766" title="Signal all threads waiting for a signalling event in pa_threaded_mainloop_wait(). ...">pa_threaded_mainloop_signal()</a> with a non-zero wait_for_accept value. </p>

</div>
</div>
<a id="a00afff8173668f12e19d574cd4e4134b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00afff8173668f12e19d574cd4e4134b">&#9670;&nbsp;</a></span>pa_threaded_mainloop_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a threaded main loop object. </p>
<p>If the event loop thread is still running, terminate it with <a class="el" href="thread-mainloop_8h.html#a2a017a59832e81a44aa8989c403fb70e" title="Terminate the event loop thread cleanly. ">pa_threaded_mainloop_stop()</a> first. </p>

</div>
</div>
<a id="aab3c05099eafa9947aa7894af2f79fda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab3c05099eafa9947aa7894af2f79fda">&#9670;&nbsp;</a></span>pa_threaded_mainloop_get_api()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structpa__mainloop__api.html">pa_mainloop_api</a>* pa_threaded_mainloop_get_api </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the main loop abstraction layer vtable for this main loop. </p>
<p>There is no need to free this object as it is owned by the loop and is destroyed when the loop is freed. </p>

</div>
</div>
<a id="a487aaf9946ccddbd54c68a6c3fb3fe39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a487aaf9946ccddbd54c68a6c3fb3fe39">&#9670;&nbsp;</a></span>pa_threaded_mainloop_get_retval()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_threaded_mainloop_get_retval </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the return value as specified with the main loop's <a class="el" href="mainloop_8h.html#a3000eb1bacba8773424a779cbbb12572" title="Shutdown the main loop with the specified return value. ">pa_mainloop_quit()</a> routine. </p>

</div>
</div>
<a id="a7a5f04b51cc3011de90e1490c8baacd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a5f04b51cc3011de90e1490c8baacd0">&#9670;&nbsp;</a></span>pa_threaded_mainloop_in_thread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_threaded_mainloop_in_thread </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns non-zero when called from within the event loop thread. </p>
<dl class="section since"><dt>Since</dt><dd>0.9.7 </dd></dl>

</div>
</div>
<a id="a2fd002f510ed24cabacb63a26bf4c977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fd002f510ed24cabacb63a26bf4c977">&#9670;&nbsp;</a></span>pa_threaded_mainloop_lock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_lock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lock the event loop object, effectively blocking the event loop thread from processing events. </p>
<p>You can use this to enforce exclusive access to all objects attached to the event loop. This lock is recursive. This function may not be called inside the event loop thread. Events that are dispatched from the event loop thread are executed with this lock held. </p>

</div>
</div>
<a id="a3b8bf5f49d7eb9d6fe6ea008eb6482f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b8bf5f49d7eb9d6fe6ea008eb6482f2">&#9670;&nbsp;</a></span>pa_threaded_mainloop_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a>* pa_threaded_mainloop_new </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocate a new threaded main loop object. </p>
<p>You have to call <a class="el" href="thread-mainloop_8h.html#a2faf4ddb9a94f74d6e7ef80843e73d30" title="Start the event loop thread. ">pa_threaded_mainloop_start()</a> before the event loop thread starts running. </p>

</div>
</div>
<a id="ab44d948b5091a906640e4b33ee3d0983"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab44d948b5091a906640e4b33ee3d0983">&#9670;&nbsp;</a></span>pa_threaded_mainloop_set_name()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_set_name </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the name of the thread. </p>
<dl class="section since"><dt>Since</dt><dd>5.0 </dd></dl>

</div>
</div>
<a id="ad253b70911af81c04417793841a15766"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad253b70911af81c04417793841a15766">&#9670;&nbsp;</a></span>pa_threaded_mainloop_signal()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_signal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>wait_for_accept</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Signal all threads waiting for a signalling event in <a class="el" href="thread-mainloop_8h.html#ac96d19260567d0406350f1b3a14c4bed" title="Wait for an event to be signalled by the event loop thread. ">pa_threaded_mainloop_wait()</a>. </p>
<p>If wait_for_accept is non-zero, do not return before the signal was accepted by a <a class="el" href="thread-mainloop_8h.html#a254b0862e30845a4b0427a7a74b3db91" title="Accept a signal from the event thread issued with pa_threaded_mainloop_signal(). ">pa_threaded_mainloop_accept()</a> call. While waiting for that condition the event loop object is unlocked. </p>

</div>
</div>
<a id="a2faf4ddb9a94f74d6e7ef80843e73d30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2faf4ddb9a94f74d6e7ef80843e73d30">&#9670;&nbsp;</a></span>pa_threaded_mainloop_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int pa_threaded_mainloop_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the event loop thread. </p>

</div>
</div>
<a id="a2a017a59832e81a44aa8989c403fb70e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a017a59832e81a44aa8989c403fb70e">&#9670;&nbsp;</a></span>pa_threaded_mainloop_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Terminate the event loop thread cleanly. </p>
<p>Make sure to unlock the mainloop object before calling this function. </p>

</div>
</div>
<a id="ab2b2beaa3a66135da67d61db211f0829"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2b2beaa3a66135da67d61db211f0829">&#9670;&nbsp;</a></span>pa_threaded_mainloop_unlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_unlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unlock the event loop object, inverse of <a class="el" href="thread-mainloop_8h.html#a2fd002f510ed24cabacb63a26bf4c977" title="Lock the event loop object, effectively blocking the event loop thread from processing events...">pa_threaded_mainloop_lock()</a>. </p>

</div>
</div>
<a id="ac96d19260567d0406350f1b3a14c4bed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac96d19260567d0406350f1b3a14c4bed">&#9670;&nbsp;</a></span>pa_threaded_mainloop_wait()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pa_threaded_mainloop_wait </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread-mainloop_8h.html#a40393b9b64dc8213bcd5f017344baf74">pa_threaded_mainloop</a> *&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wait for an event to be signalled by the event loop thread. </p>
<p>You can use this to pass data from the event loop thread to the main thread in a synchronized fashion. This function may not be called inside the event loop thread. Prior to this call the event loop object needs to be locked using <a class="el" href="thread-mainloop_8h.html#a2fd002f510ed24cabacb63a26bf4c977" title="Lock the event loop object, effectively blocking the event loop thread from processing events...">pa_threaded_mainloop_lock()</a>. While waiting the lock will be released. Immediately before returning it will be acquired again. This function may spuriously wake up even without <a class="el" href="thread-mainloop_8h.html#ad253b70911af81c04417793841a15766" title="Signal all threads waiting for a signalling event in pa_threaded_mainloop_wait(). ...">pa_threaded_mainloop_signal()</a> being called. You need to make sure to handle that! </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_ec5b0a79aff2db41fe5d1b9326f09c28.html">pulse</a></li><li class="navelem"><a class="el" href="thread-mainloop_8h.html">thread-mainloop.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>