openjpeg/doxygen/thread_8c.html

1035 lines
80 KiB
HTML
Raw Permalink Normal View History

2022-05-13 20:21:13 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2017-08-10 06:39:58 +02:00
<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"/>
2022-05-13 20:21:13 +02:00
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2017-08-10 06:39:58 +02:00
<title>OpenJPEG: thread.c 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="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">OpenJPEG
2022-05-13 20:21:13 +02:00
&#160;<span id="projectnumber">2.5.0</span>
2017-08-10 06:39:58 +02:00
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2022-05-13 20:21:13 +02:00
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
2017-08-10 06:39:58 +02:00
<div id="nav-path" class="navpath">
<ul>
2020-12-28 22:12:25 +01:00
<li class="navelem"><a class="el" href="dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="dir_cb9b2b419d92b64f7cee83d8faf7a4ab.html">even</a></li><li class="navelem"><a class="el" href="dir_f75d9a0165d6564a1e04793ef847d41d.html">openjpeg</a></li><li class="navelem"><a class="el" href="dir_5f588d7ea139c1aae751d03c13a16064.html">openjpeg</a></li><li class="navelem"><a class="el" href="dir_378f732e812ef6cbaaae22e96a4fa79f.html">src</a></li><li class="navelem"><a class="el" href="dir_19dcb5713315405a27e1bde75a489a4c.html">lib</a></li><li class="navelem"><a class="el" href="dir_54e5bc4f0640fea590afaf04f4d9c88d.html">openjp2</a></li> </ul>
2017-08-10 06:39:58 +02:00
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">thread.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
2017-10-05 00:57:21 +02:00
<div class="textblock"><code>#include &lt;assert.h&gt;</code><br />
<code>#include &quot;<a class="el" href="opj__includes_8h_source.html">opj_includes.h</a>&quot;</code><br />
2017-08-10 06:39:58 +02:00
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__tls__key__val__t.html">opj_tls_key_val_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__tls__t.html">opj_tls_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__worker__thread__job__t.html">opj_worker_thread_job_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__worker__thread__t.html">opj_worker_thread_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__job__list__t.html">opj_job_list_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__worker__thread__list__t.html">opj_worker_thread_list_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a49bc29f76a9aaa7d5429ca2aa658d042"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structopj__job__list__t.html">opj_job_list_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a49bc29f76a9aaa7d5429ca2aa658d042">opj_job_list_t</a></td></tr>
<tr class="separator:a49bc29f76a9aaa7d5429ca2aa658d042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e5ebd302ebe1fec27a59e0a97f3775d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structopj__worker__thread__list__t.html">opj_worker_thread_list_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a7e5ebd302ebe1fec27a59e0a97f3775d">opj_worker_thread_list_t</a></td></tr>
<tr class="separator:a7e5ebd302ebe1fec27a59e0a97f3775d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a72b07be38efb141bb1f0456227d233e5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5">opj_worker_thread_state</a> { <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a837ff250630d32ebcbdec8ab7545cd23">OPJWTS_OK</a>,
<a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a3e1ea93366aedb1abcd0498bf72db68a">OPJWTS_STOP</a>,
<a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a6ef08c3281ba796adc681df793f69dfd">OPJWTS_ERROR</a>
2019-04-02 16:25:55 +02:00
}</td></tr>
<tr class="separator:a72b07be38efb141bb1f0456227d233e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
2017-08-10 06:39:58 +02:00
</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:aae69d6e8a731757a983888c4047d3e3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> <a class="el" href="openjpeg_8h.html#aedc1e23ea6654d0cc416bc390687458b">OPJ_CALLCONV</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#aae69d6e8a731757a983888c4047d3e3b">opj_has_thread_support</a> (void)</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memdesc:aae69d6e8a731757a983888c4047d3e3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns if the library is built with thread support. <a href="thread_8c.html#aae69d6e8a731757a983888c4047d3e3b">More...</a><br /></td></tr>
2017-08-10 06:39:58 +02:00
<tr class="separator:aae69d6e8a731757a983888c4047d3e3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93ce856805936340ca26e98bcf3f4996"><td class="memItemLeft" align="right" valign="top">int <a class="el" href="openjpeg_8h.html#aedc1e23ea6654d0cc416bc390687458b">OPJ_CALLCONV</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a93ce856805936340ca26e98bcf3f4996">opj_get_num_cpus</a> (void)</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memdesc:a93ce856805936340ca26e98bcf3f4996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of virtual CPUs. <a href="thread_8c.html#a93ce856805936340ca26e98bcf3f4996">More...</a><br /></td></tr>
2017-08-10 06:39:58 +02:00
<tr class="separator:a93ce856805936340ca26e98bcf3f4996"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memitem:aa81ea27e801a8c0cf453b256ab38e067"><td class="memItemLeft" align="right" valign="top"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#aa81ea27e801a8c0cf453b256ab38e067">opj_mutex_create</a> (void)</td></tr>
<tr class="memdesc:aa81ea27e801a8c0cf453b256ab38e067"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a mutex. <a href="thread_8c.html#aa81ea27e801a8c0cf453b256ab38e067">More...</a><br /></td></tr>
<tr class="separator:aa81ea27e801a8c0cf453b256ab38e067"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab38a90b92a1d294f7e1886e36a405518"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock</a> (<a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
<tr class="memdesc:ab38a90b92a1d294f7e1886e36a405518"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock/acquire the mutex. <a href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">More...</a><br /></td></tr>
<tr class="separator:ab38a90b92a1d294f7e1886e36a405518"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf1f5a5f7f7257663505af02b717272c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock</a> (<a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
<tr class="memdesc:acf1f5a5f7f7257663505af02b717272c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock/release the mutex. <a href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">More...</a><br /></td></tr>
<tr class="separator:acf1f5a5f7f7257663505af02b717272c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66757c34c788b873ad9acfb60a5e008b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a66757c34c788b873ad9acfb60a5e008b">opj_mutex_destroy</a> (<a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
<tr class="memdesc:a66757c34c788b873ad9acfb60a5e008b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a mutex. <a href="thread_8c.html#a66757c34c788b873ad9acfb60a5e008b">More...</a><br /></td></tr>
<tr class="separator:a66757c34c788b873ad9acfb60a5e008b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f8a4c1ce6d9ad2dde1d293fad317522"><td class="memItemLeft" align="right" valign="top"><a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a7f8a4c1ce6d9ad2dde1d293fad317522">opj_cond_create</a> (void)</td></tr>
<tr class="memdesc:a7f8a4c1ce6d9ad2dde1d293fad317522"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a condition. <a href="thread_8c.html#a7f8a4c1ce6d9ad2dde1d293fad317522">More...</a><br /></td></tr>
<tr class="separator:a7f8a4c1ce6d9ad2dde1d293fad317522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6edf64f08cd0b48299800852d52245d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait</a> (<a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond, <a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
<tr class="memdesc:a6edf64f08cd0b48299800852d52245d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the condition to be signaled. <a href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">More...</a><br /></td></tr>
<tr class="separator:a6edf64f08cd0b48299800852d52245d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f3687b35d6f3c395e1156a8499d1632"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal</a> (<a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond)</td></tr>
<tr class="memdesc:a0f3687b35d6f3c395e1156a8499d1632"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal waiting threads on a condition. <a href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">More...</a><br /></td></tr>
<tr class="separator:a0f3687b35d6f3c395e1156a8499d1632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afba4c2356f6d070d43e5f0d5c71fdbee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#afba4c2356f6d070d43e5f0d5c71fdbee">opj_cond_destroy</a> (<a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond)</td></tr>
<tr class="memdesc:afba4c2356f6d070d43e5f0d5c71fdbee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a condition. <a href="thread_8c.html#afba4c2356f6d070d43e5f0d5c71fdbee">More...</a><br /></td></tr>
<tr class="separator:afba4c2356f6d070d43e5f0d5c71fdbee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a541be683ba651c8244bde3f0d3650c92"><td class="memItemLeft" align="right" valign="top"><a class="el" href="thread_8h.html#aed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a541be683ba651c8244bde3f0d3650c92">opj_thread_create</a> (<a class="el" href="thread_8h.html#ae5f9aa8219645e0e836aaf0c453db624">opj_thread_fn</a> thread_fn, void *user_data)</td></tr>
<tr class="memdesc:a541be683ba651c8244bde3f0d3650c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new thread. <a href="thread_8c.html#a541be683ba651c8244bde3f0d3650c92">More...</a><br /></td></tr>
<tr class="separator:a541be683ba651c8244bde3f0d3650c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad49986b56da75f8609b7c940c17f713f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#ad49986b56da75f8609b7c940c17f713f">opj_thread_join</a> (<a class="el" href="thread_8h.html#aed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *thread)</td></tr>
<tr class="memdesc:ad49986b56da75f8609b7c940c17f713f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for a thread to be finished and release associated resources to the thread handle. <a href="thread_8c.html#ad49986b56da75f8609b7c940c17f713f">More...</a><br /></td></tr>
<tr class="separator:ad49986b56da75f8609b7c940c17f713f"><td class="memSeparator" colspan="2">&#160;</td></tr>
2017-08-10 06:39:58 +02:00
<tr class="memitem:a28308877c7160bae4a21d2b1c8bddfe0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a28308877c7160bae4a21d2b1c8bddfe0">opj_tls_new</a> (void)</td></tr>
<tr class="separator:a28308877c7160bae4a21d2b1c8bddfe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f4ee11fc0faa44d49f2c341cbf3dc79"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a8f4ee11fc0faa44d49f2c341cbf3dc79">opj_tls_destroy</a> (<a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls)</td></tr>
<tr class="separator:a8f4ee11fc0faa44d49f2c341cbf3dc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memitem:a90caa0ff9c1e54033ef1e3010faf03a9"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a90caa0ff9c1e54033ef1e3010faf03a9">opj_tls_get</a> (<a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls, int key)</td></tr>
<tr class="memdesc:a90caa0ff9c1e54033ef1e3010faf03a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a thread local value corresponding to the provided key. <a href="thread_8c.html#a90caa0ff9c1e54033ef1e3010faf03a9">More...</a><br /></td></tr>
<tr class="separator:a90caa0ff9c1e54033ef1e3010faf03a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35034e7c9fa76c7e1e719bf7900f9ee2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a35034e7c9fa76c7e1e719bf7900f9ee2">opj_tls_set</a> (<a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls, int key, void *value, <a class="el" href="thread_8h.html#a38f8cdfd288c8ff8963444403549ad6c">opj_tls_free_func</a> opj_free_func)</td></tr>
<tr class="memdesc:a35034e7c9fa76c7e1e719bf7900f9ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a thread local value corresponding to the provided key. <a href="thread_8c.html#a35034e7c9fa76c7e1e719bf7900f9ee2">More...</a><br /></td></tr>
<tr class="separator:a35034e7c9fa76c7e1e719bf7900f9ee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
2017-08-10 06:39:58 +02:00
<tr class="memitem:acdca1ecb372546840fdd9d5d5badce07"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp, int num_threads)</td></tr>
<tr class="separator:acdca1ecb372546840fdd9d5d5badce07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57e6dc05f2283639a2ec0b6884d9691c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structopj__worker__thread__job__t.html">opj_worker_thread_job_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp, <a class="el" href="structopj__worker__thread__t.html">opj_worker_thread_t</a> *worker_thread, <a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> signal_job_finished)</td></tr>
<tr class="separator:a57e6dc05f2283639a2ec0b6884d9691c"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memitem:a24a3a1b343df1168a3beb57babfa0916"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create</a> (int num_threads)</td></tr>
<tr class="memdesc:a24a3a1b343df1168a3beb57babfa0916"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new thread pool. <a href="thread_8c.html#a24a3a1b343df1168a3beb57babfa0916">More...</a><br /></td></tr>
<tr class="separator:a24a3a1b343df1168a3beb57babfa0916"><td class="memSeparator" colspan="2">&#160;</td></tr>
2017-08-10 06:39:58 +02:00
<tr class="memitem:ac0a73d8572dbdb91b3a9a10b053f23ec"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#ac0a73d8572dbdb91b3a9a10b053f23ec">opj_worker_thread_function</a> (void *user_data)</td></tr>
<tr class="separator:ac0a73d8572dbdb91b3a9a10b053f23ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-05-13 20:21:13 +02:00
<tr class="memitem:af389ecb3a583a30077fc546eef767c89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#af389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp, <a class="el" href="thread_8h.html#af29983f3245378c30edbef61fe22913b">opj_job_fn</a> job_fn, void *user_data)</td></tr>
<tr class="memdesc:af389ecb3a583a30077fc546eef767c89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Submit a new job to be run by one of the thread in the thread pool. <a href="thread_8c.html#af389ecb3a583a30077fc546eef767c89">More...</a><br /></td></tr>
<tr class="separator:af389ecb3a583a30077fc546eef767c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ced26c80598e49bf3a964bb802130f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp, int max_remaining_jobs)</td></tr>
<tr class="memdesc:a0ced26c80598e49bf3a964bb802130f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait that no more than max_remaining_jobs jobs are remaining in the queue of the thread pool. <a href="thread_8c.html#a0ced26c80598e49bf3a964bb802130f1">More...</a><br /></td></tr>
<tr class="separator:a0ced26c80598e49bf3a964bb802130f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#a4faef98a6b8495c63e9e5ce9cf0c3fc3">opj_thread_pool_get_thread_count</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp)</td></tr>
<tr class="memdesc:a4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of threads associated with the thread pool. <a href="thread_8c.html#a4faef98a6b8495c63e9e5ce9cf0c3fc3">More...</a><br /></td></tr>
<tr class="separator:a4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae44e8b9258d0baa19e3671a382faa33e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="thread_8c.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp)</td></tr>
<tr class="memdesc:ae44e8b9258d0baa19e3671a382faa33e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a thread pool. <a href="thread_8c.html#ae44e8b9258d0baa19e3671a382faa33e">More...</a><br /></td></tr>
<tr class="separator:ae44e8b9258d0baa19e3671a382faa33e"><td class="memSeparator" colspan="2">&#160;</td></tr>
2017-08-10 06:39:58 +02:00
</table>
<h2 class="groupheader">Typedef Documentation</h2>
2022-05-13 20:21:13 +02:00
<a id="a49bc29f76a9aaa7d5429ca2aa658d042"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49bc29f76a9aaa7d5429ca2aa658d042">&#9670;&nbsp;</a></span>opj_job_list_t</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structopj__job__list__t.html">opj_job_list_t</a> <a class="el" href="structopj__job__list__t.html">opj_job_list_t</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="a7e5ebd302ebe1fec27a59e0a97f3775d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e5ebd302ebe1fec27a59e0a97f3775d">&#9670;&nbsp;</a></span>opj_worker_thread_list_t</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structopj__worker__thread__list__t.html">opj_worker_thread_list_t</a> <a class="el" href="structopj__worker__thread__list__t.html">opj_worker_thread_list_t</a></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
2022-05-13 20:21:13 +02:00
<a id="a72b07be38efb141bb1f0456227d233e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72b07be38efb141bb1f0456227d233e5">&#9670;&nbsp;</a></span>opj_worker_thread_state</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5">opj_worker_thread_state</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
2022-05-13 20:21:13 +02:00
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a72b07be38efb141bb1f0456227d233e5a837ff250630d32ebcbdec8ab7545cd23"></a>OPJWTS_OK&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a72b07be38efb141bb1f0456227d233e5a3e1ea93366aedb1abcd0498bf72db68a"></a>OPJWTS_STOP&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a72b07be38efb141bb1f0456227d233e5a6ef08c3281ba796adc681df793f69dfd"></a>OPJWTS_ERROR&#160;</td><td class="fielddoc"></td></tr>
2017-08-10 06:39:58 +02:00
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
2022-05-13 20:21:13 +02:00
<a id="a7f8a4c1ce6d9ad2dde1d293fad317522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f8a4c1ce6d9ad2dde1d293fad317522">&#9670;&nbsp;</a></span>opj_cond_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a>* opj_cond_create </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a condition. </p>
<dl class="section return"><dt>Returns</dt><dd>the condition or NULL in case of error (can for example happen if the library is built without thread support) </dd></dl>
<p class="reference">Referenced by <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
</div>
</div>
<a id="afba4c2356f6d070d43e5f0d5c71fdbee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afba4c2356f6d070d43e5f0d5c71fdbee">&#9670;&nbsp;</a></span>opj_cond_destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_cond_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
<td class="paramname"><em>cond</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a condition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cond</td><td>the condition to destroy. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
</div>
</div>
<a id="a0f3687b35d6f3c395e1156a8499d1632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f3687b35d6f3c395e1156a8499d1632">&#9670;&nbsp;</a></span>opj_cond_signal()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_cond_signal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
<td class="paramname"><em>cond</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Signal waiting threads on a condition. </p>
<p>One of the thread waiting with <a class="el" href="thread_8h.html#a6edf64f08cd0b48299800852d52245d6" title="Wait for the condition to be signaled.">opj_cond_wait()</a> will be waken up. It is strongly advised that this call is done with the mutex that is used by <a class="el" href="thread_8h.html#a6edf64f08cd0b48299800852d52245d6" title="Wait for the condition to be signaled.">opj_cond_wait()</a>, in a acquired state. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cond</td><td>the condition to signal. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, <a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job()</a>, and <a class="el" href="thread_8h.html#af389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>.</p>
</div>
</div>
<a id="a6edf64f08cd0b48299800852d52245d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6edf64f08cd0b48299800852d52245d6">&#9670;&nbsp;</a></span>opj_cond_wait()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_cond_wait </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
<td class="paramname"><em>cond</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
<td class="paramname"><em>mutex</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for the condition to be signaled. </p>
<p>The semantics is the same as the POSIX pthread_cond_wait. The provided mutex <em>must</em> be acquired before calling this function, and released afterwards. The mutex will be released by this function while it must wait for the condition and reacquired afterwards. In some particular situations, the function might return even if the condition is not signaled with <a class="el" href="thread_8h.html#a0f3687b35d6f3c395e1156a8499d1632" title="Signal waiting threads on a condition.">opj_cond_signal()</a>, hence the need to check with an application level mechanism.</p>
<p>Waiting thread : </p><div class="fragment"><div class="line"><a class="code" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock</a>(<a class="code" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">mutex</a>);</div>
<div class="line"><span class="keywordflow">while</span>( !some_application_level_condition )</div>
<div class="line">{</div>
<div class="line"> <a class="code" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait</a>(<a class="code" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">cond</a>, <a class="code" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">mutex</a>);</div>
<div class="line">}</div>
<div class="line"><a class="code" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock</a>(<a class="code" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">mutex</a>);</div>
</div><!-- fragment --><p>Signaling thread : </p><div class="fragment"><div class="line"><a class="code" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock</a>(<a class="code" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">mutex</a>);</div>
<div class="line">some_application_level_condition = TRUE;</div>
<div class="line"><a class="code" href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal</a>(<a class="code" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">cond</a>);</div>
<div class="line"><a class="code" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock</a>(<a class="code" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">mutex</a>);</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cond</td><td>the condition to wait. </td></tr>
<tr><td class="paramname">mutex</td><td>the mutex (in acquired state before calling this function) </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job()</a>, <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>, <a class="el" href="thread_8h.html#af389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="thread_8h.html#a0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
</div>
</div>
<a id="a93ce856805936340ca26e98bcf3f4996"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93ce856805936340ca26e98bcf3f4996">&#9670;&nbsp;</a></span>opj_get_num_cpus()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="openjpeg_8h.html#aedc1e23ea6654d0cc416bc390687458b">OPJ_CALLCONV</a> opj_get_num_cpus </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of virtual CPUs. </p>
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="j2k_8c.html#ac8b636dfb2c65311872afe7de0ee121b">opj_j2k_get_default_thread_count()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="aae69d6e8a731757a983888c4047d3e3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae69d6e8a731757a983888c4047d3e3b">&#9670;&nbsp;</a></span>opj_has_thread_support()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> <a class="el" href="openjpeg_8h.html#aedc1e23ea6654d0cc416bc390687458b">OPJ_CALLCONV</a> opj_has_thread_support </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns if the library is built with thread support. </p>
<p>OPJ_TRUE if mutex, condition, thread, thread pool are available. </p>
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>.</p>
<p class="reference">Referenced by <a class="el" href="j2k_8c.html#ac8b636dfb2c65311872afe7de0ee121b">opj_j2k_get_default_thread_count()</a>, and <a class="el" href="j2k_8h.html#abecf91393e6703f8be5006b19df1be22">opj_j2k_set_threads()</a>.</p>
</div>
</div>
<a id="aa81ea27e801a8c0cf453b256ab38e067"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa81ea27e801a8c0cf453b256ab38e067">&#9670;&nbsp;</a></span>opj_mutex_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a>* opj_mutex_create </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a mutex. </p>
<dl class="section return"><dt>Returns</dt><dd>the mutex or NULL in case of error (can for example happen if the library is built without thread support) </dd></dl>
<p class="reference">Referenced by <a class="el" href="t1_8h.html#aa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, <a class="el" href="thread_8h.html#a24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
</div>
</div>
<a id="a66757c34c788b873ad9acfb60a5e008b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66757c34c788b873ad9acfb60a5e008b">&#9670;&nbsp;</a></span>opj_mutex_destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_mutex_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a mutex. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mutex</td><td>the mutex to destroy. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="t1_8h.html#aa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
</div>
</div>
<a id="ab38a90b92a1d294f7e1886e36a405518"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab38a90b92a1d294f7e1886e36a405518">&#9670;&nbsp;</a></span>opj_mutex_lock()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_mutex_lock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Lock/acquire the mutex. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mutex</td><td>the mutex to acquire. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="t1_8c.html#a3a260db0855d38ed19c060139365b1ad">opj_t1_cblk_encode_processor()</a>, <a class="el" href="t1_8c.html#a4f37cf7aca8eb1313fe5bc320c85ad55">opj_t1_clbl_decode_processor()</a>, <a class="el" href="t1_8c.html#ab90391839b2f56ca40aaae1b8748ca3c">opj_t1_decode_cblk()</a>, <a class="el" href="t1_8c.html#a8e1566cecb98cad92924d1fac5fdc900">opj_t1_ht_decode_cblk()</a>, <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, <a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job()</a>, <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>, <a class="el" href="thread_8h.html#af389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="thread_8h.html#a0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
</div>
</div>
<a id="acf1f5a5f7f7257663505af02b717272c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf1f5a5f7f7257663505af02b717272c">&#9670;&nbsp;</a></span>opj_mutex_unlock()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_mutex_unlock </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#a29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Unlock/release the mutex. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mutex</td><td>the mutex to release. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="t1_8c.html#a3a260db0855d38ed19c060139365b1ad">opj_t1_cblk_encode_processor()</a>, <a class="el" href="t1_8c.html#a4f37cf7aca8eb1313fe5bc320c85ad55">opj_t1_clbl_decode_processor()</a>, <a class="el" href="t1_8c.html#ab90391839b2f56ca40aaae1b8748ca3c">opj_t1_decode_cblk()</a>, <a class="el" href="t1_8c.html#a8e1566cecb98cad92924d1fac5fdc900">opj_t1_ht_decode_cblk()</a>, <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, <a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job()</a>, <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>, <a class="el" href="thread_8h.html#af389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="thread_8h.html#a0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
</div>
</div>
<a id="a541be683ba651c8244bde3f0d3650c92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a541be683ba651c8244bde3f0d3650c92">&#9670;&nbsp;</a></span>opj_thread_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="thread_8h.html#aed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a>* opj_thread_create </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#ae5f9aa8219645e0e836aaf0c453db624">opj_thread_fn</a>&#160;</td>
<td class="paramname"><em>thread_fn</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>user_data</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">thread_fn</td><td>Function to run in the new thread. </td></tr>
<tr><td class="paramname">user_data</td><td>user data provided to the thread function. Might be NULL. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a thread handle or NULL in case of failure (can for example happen if the library is built without thread support) </dd></dl>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="ad49986b56da75f8609b7c940c17f713f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad49986b56da75f8609b7c940c17f713f">&#9670;&nbsp;</a></span>opj_thread_join()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_thread_join </td>
<td>(</td>
<td class="paramtype"><a class="el" href="thread_8h.html#aed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *&#160;</td>
<td class="paramname"><em>thread</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for a thread to be finished and release associated resources to the thread handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">thread</td><td>the thread to wait for being finished. </td></tr>
</table>
</dd>
</dl>
<p class="reference">Referenced by <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>.</p>
</div>
</div>
<a id="a24a3a1b343df1168a3beb57babfa0916"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24a3a1b343df1168a3beb57babfa0916">&#9670;&nbsp;</a></span>opj_thread_pool_create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a>* opj_thread_pool_create </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>num_threads</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new thread pool. </p>
<p>num_thread must nominally be &gt;= 1 to create a real thread pool. If num_threads is negative or null, then a dummy thread pool will be created. All functions operating on the thread pool will work, but job submission will be run synchronously in the calling thread.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">num_threads</td><td>the number of threads to allocate for this thread pool. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a thread pool handle, or NULL in case of failure (can for example happen if the library is built without thread support) </dd></dl>
<p class="reference">References <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="opj__malloc_8c.html#a3fe08bb7876e393dd04332d049a4d53e">opj_calloc()</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="thread_8c.html#aa81ea27e801a8c0cf453b256ab38e067">opj_mutex_create()</a>, <a class="el" href="thread_8c.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>, <a class="el" href="thread_8c.html#a28308877c7160bae4a21d2b1c8bddfe0">opj_tls_new()</a>, <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a837ff250630d32ebcbdec8ab7545cd23">OPJWTS_OK</a>, <a class="el" href="structopj__thread__pool__t.html#a3ee9c2691cf72fb90bf662490830b72b">opj_thread_pool_t::state</a>, and <a class="el" href="structopj__thread__pool__t.html#a401a98b276c965e0b63efaf9e1369730">opj_thread_pool_t::tls</a>.</p>
<p class="reference">Referenced by <a class="el" href="bench__dwt_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, <a class="el" href="j2k_8h.html#ad3c2b25f4d5a5f6fd4b442bc7210f6da">opj_j2k_create_compress()</a>, <a class="el" href="j2k_8h.html#ad76bb79d4d63030222ebf3dbe3fe86cf">opj_j2k_create_decompress()</a>, and <a class="el" href="j2k_8h.html#abecf91393e6703f8be5006b19df1be22">opj_j2k_set_threads()</a>.</p>
</div>
</div>
<a id="ae44e8b9258d0baa19e3671a382faa33e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae44e8b9258d0baa19e3671a382faa33e">&#9670;&nbsp;</a></span>opj_thread_pool_destroy()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_thread_pool_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy a thread pool. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="structopj__worker__thread__t.html#a8e7cdff9dab59b5be9ed46436437f28a">opj_worker_thread_t::cond</a>, <a class="el" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a>, <a class="el" href="structopj__worker__thread__t.html#a2ba43db98feae7de2aaed97d08ec55ce">opj_worker_thread_t::mutex</a>, <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="structopj__worker__thread__list__t.html#ac0a28fac91ec02c49898229a1122aa67">opj_worker_thread_list_t::next</a>, <a class="el" href="thread_8c.html#afba4c2356f6d070d43e5f0d5c71fdbee">opj_cond_destroy()</a>, <a class="el" href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal()</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="thread_8c.html#a66757c34c788b873ad9acfb60a5e008b">opj_mutex_destroy()</a>, <a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="thread_8c.html#ad49986b56da75f8609b7c940c17f713f">opj_thread_join()</a>, <a class="el" href="thread_8c.html#a0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>, <a class="el" href="thread_8c.html#a8f4ee11fc0faa44d49f2c341cbf3dc79">opj_tls_destroy()</a>, <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a3e1ea93366aedb1abcd0498bf72db68a">OPJWTS_STOP</a>, <a class="el" href="structopj__thread__pool__t.html#a3ee9c2691cf72fb90bf662490830b72b">opj_thread_pool_t::state</a>, <a class="el" href="structopj__worker__thread__t.html#a7ef79b815efbb4ff8d49f3ed4f677073">opj_worker_thread_t::thread</a>, <a class="el" href="structopj__thread__pool__t.html#a401a98b276c965e0b63efaf9e1369730">opj_thread_pool_t::tls</a>, <a class="el" href="structopj__thread__pool__t.html#a50c4caa87ba2a6767d909898cc92b37a">opj_thread_pool_t::waiting_worker_thread_list</a>, <a class="el" href="structopj__thread__pool__t.html#adb012d263904a4f62812ed7d30b0a47e">opj_thread_pool_t::worker_threads</a>, and <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
<p class="reference">Referenced by <a class="el" href="bench__dwt_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, <a class="el" href="j2k_8h.html#a5c4508543b134e726107308b6463528e">opj_j2k_destroy()</a>, <a class="el" href="j2k_8h.html#abecf91393e6703f8be5006b19df1be22">opj_j2k_set_threads()</a>, and <a class="el" href="thread_8h.html#a24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>.</p>
</div>
</div>
<a id="a57e6dc05f2283639a2ec0b6884d9691c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57e6dc05f2283639a2ec0b6884d9691c">&#9670;&nbsp;</a></span>opj_thread_pool_get_next_job()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="structopj__worker__thread__job__t.html">opj_worker_thread_job_t</a> * opj_thread_pool_get_next_job </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structopj__worker__thread__t.html">opj_worker_thread_t</a> *&#160;</td>
<td class="paramname"><em>worker_thread</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a>&#160;</td>
<td class="paramname"><em>signal_job_finished</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="structopj__worker__thread__t.html#a8e7cdff9dab59b5be9ed46436437f28a">opj_worker_thread_t::cond</a>, <a class="el" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a>, <a class="el" href="structopj__job__list__t.html#a84b556f2984f8f7a4b38cb0a075d3d1e">opj_job_list_t::job</a>, <a class="el" href="structopj__thread__pool__t.html#aff15e4a4599fc823762f8d3c28d8353d">opj_thread_pool_t::job_queue</a>, <a class="el" href="structopj__worker__thread__t.html#a6cf93c9b46f4b51b9247a179f49fc796">opj_worker_thread_t::marked_as_waiting</a>, <a class="el" href="structopj__worker__thread__t.html#a2ba43db98feae7de2aaed97d08ec55ce">opj_worker_thread_t::mutex</a>, <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="structopj__job__list__t.html#a27d174268d6050639a4032780172d87f">opj_job_list_t::next</a>, <a class="el" href="structopj__worker__thread__list__t.html#ac0a28fac91ec02c49898229a1122aa67">opj_worker_thread_list_t::next</a>, <a class="el" href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal()</a>, <a class="el" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="opj__malloc_8c.html#a49c70931cbed786f6eef5f095bcb2917">opj_malloc()</a>, <a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="openjpeg_8h.html#a04830036d767cba56cbf5ae5bdc481d3">OPJ_TRUE</a>, <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a6ef08c3281ba796adc681df793f69dfd">OPJWTS_ERROR</a>, <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a3e1ea93366aedb1abcd0498bf72db68a">OPJWTS_STOP</a>, <a class="el" href="structopj__thread__pool__t.html#ad84a2e09419498cf81c8994f0441b131">opj_thread_pool_t::pending_jobs_count</a>, <a class="el" href="structopj__thread__pool__t.html#ae68571d1cf6eae577c75df49c2827438">opj_thread_pool_t::signaling_threshold</a>, <a class="el" href="structopj__thread__pool__t.html#a3ee9c2691cf72fb90bf662490830b72b">opj_thread_pool_t::state</a>, <a class="el" href="structopj__thread__pool__t.html#abad6b35fb3cc6cd8aaaf523de9a4a187">opj_thread_pool_t::waiting_worker_thread_count</a>, <a class="el" href="structopj__thread__pool__t.html#a50c4caa87ba2a6767d909898cc92b37a">opj_thread_pool_t::waiting_worker_thread_list</a>, <a class="el" href="structopj__worker__thread__list__t.html#af36b36ba7fc3ab5febe59faf30c86c7f">opj_worker_thread_list_t::worker_thread</a>, and <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
<p class="reference">Referenced by <a class="el" href="thread_8c.html#ac0a73d8572dbdb91b3a9a10b053f23ec">opj_worker_thread_function()</a>.</p>
</div>
</div>
<a id="a4faef98a6b8495c63e9e5ce9cf0c3fc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4faef98a6b8495c63e9e5ce9cf0c3fc3">&#9670;&nbsp;</a></span>opj_thread_pool_get_thread_count()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int opj_thread_pool_get_thread_count </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of threads associated with the thread pool. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of threads associated with the thread pool. </dd></dl>
<p class="reference">References <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="dwt_8c.html#a473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="dwt_8c.html#aaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, and <a class="el" href="t1_8h.html#a5df121baefa4293a2c0d0122694e0902">opj_t1_decode_cblks()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="acdca1ecb372546840fdd9d5d5badce07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdca1ecb372546840fdd9d5d5badce07">&#9670;&nbsp;</a></span>opj_thread_pool_setup()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> opj_thread_pool_setup </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>num_threads</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="structopj__worker__thread__t.html#a8e7cdff9dab59b5be9ed46436437f28a">opj_worker_thread_t::cond</a>, <a class="el" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a>, <a class="el" href="structopj__worker__thread__t.html#a6cf93c9b46f4b51b9247a179f49fc796">opj_worker_thread_t::marked_as_waiting</a>, <a class="el" href="structopj__worker__thread__t.html#a2ba43db98feae7de2aaed97d08ec55ce">opj_worker_thread_t::mutex</a>, <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="opj__malloc_8c.html#a3fe08bb7876e393dd04332d049a4d53e">opj_calloc()</a>, <a class="el" href="thread_8c.html#a7f8a4c1ce6d9ad2dde1d293fad317522">opj_cond_create()</a>, <a class="el" href="thread_8c.html#afba4c2356f6d070d43e5f0d5c71fdbee">opj_cond_destroy()</a>, <a class="el" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="thread_8c.html#aa81ea27e801a8c0cf453b256ab38e067">opj_mutex_create()</a>, <a class="el" href="thread_8c.html#a66757c34c788b873ad9acfb60a5e008b">opj_mutex_destroy()</a>, <a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="thread_8c.html#a541be683ba651c8244bde3f0d3650c92">opj_thread_create()</a>, <a class="el" href="openjpeg_8h.html#a04830036d767cba56cbf5ae5bdc481d3">OPJ_TRUE</a>, <a class="el" href="thread_8c.html#ac0a73d8572dbdb91b3a9a10b053f23ec">opj_worker_thread_function()</a>, <a class="el" href="thread_8c.html#a72b07be38efb141bb1f0456227d233e5a6ef08c3281ba796adc681df793f69dfd">OPJWTS_ERROR</a>, <a class="el" href="structopj__thread__pool__t.html#a3ee9c2691cf72fb90bf662490830b72b">opj_thread_pool_t::state</a>, <a class="el" href="structopj__worker__thread__t.html#a7ef79b815efbb4ff8d49f3ed4f677073">opj_worker_thread_t::thread</a>, <a class="el" href="structopj__worker__thread__t.html#a81267837ab1b9934e3a1cc64680959e7">opj_worker_thread_t::tp</a>, <a class="el" href="structopj__thread__pool__t.html#abad6b35fb3cc6cd8aaaf523de9a4a187">opj_thread_pool_t::waiting_worker_thread_count</a>, <a class="el" href="structopj__thread__pool__t.html#adb012d263904a4f62812ed7d30b0a47e">opj_thread_pool_t::worker_threads</a>, and <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
<p class="reference">Referenced by <a class="el" href="thread_8h.html#a24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>.</p>
</div>
</div>
<a id="af389ecb3a583a30077fc546eef767c89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af389ecb3a583a30077fc546eef767c89">&#9670;&nbsp;</a></span>opj_thread_pool_submit_job()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> opj_thread_pool_submit_job </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="thread_8h.html#af29983f3245378c30edbef61fe22913b">opj_job_fn</a>&#160;</td>
<td class="paramname"><em>job_fn</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>user_data</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Submit a new job to be run by one of the thread in the thread pool. </p>
<p>The job ( thread_fn, user_data ) will be added in the queue of jobs managed by the thread pool, and run by the first thread that is no longer busy.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
<tr><td class="paramname">job_fn</td><td>Function to run. Must not be NULL. </td></tr>
<tr><td class="paramname">user_data</td><td>User data provided to thread_fn. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OPJ_TRUE if the job was successfully submitted. </dd></dl>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="structopj__worker__thread__t.html#a8e7cdff9dab59b5be9ed46436437f28a">opj_worker_thread_t::cond</a>, <a class="el" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a>, <a class="el" href="structopj__job__list__t.html#a84b556f2984f8f7a4b38cb0a075d3d1e">opj_job_list_t::job</a>, <a class="el" href="structopj__worker__thread__job__t.html#ab9dc542136b4596b711e3be011abdd4d">opj_worker_thread_job_t::job_fn</a>, <a class="el" href="structopj__thread__pool__t.html#aff15e4a4599fc823762f8d3c28d8353d">opj_thread_pool_t::job_queue</a>, <a class="el" href="structopj__worker__thread__t.html#a6cf93c9b46f4b51b9247a179f49fc796">opj_worker_thread_t::marked_as_waiting</a>, <a class="el" href="structopj__worker__thread__t.html#a2ba43db98feae7de2aaed97d08ec55ce">opj_worker_thread_t::mutex</a>, <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="structopj__job__list__t.html#a27d174268d6050639a4032780172d87f">opj_job_list_t::next</a>, <a class="el" href="structopj__worker__thread__list__t.html#ac0a28fac91ec02c49898229a1122aa67">opj_worker_thread_list_t::next</a>, <a class="el" href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal()</a>, <a class="el" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="opj__malloc_8c.html#a49c70931cbed786f6eef5f095bcb2917">opj_malloc()</a>, <a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="openjpeg_8h.html#a04830036d767cba56cbf5ae5bdc481d3">OPJ_TRUE</a>, <a class="el" href="structopj__thread__pool__t.html#ad84a2e09419498cf81c8994f0441b131">opj_thread_pool_t::pending_jobs_count</a>, <a class="el" href="structopj__thread__pool__t.html#ae68571d1cf6eae577c75df49c2827438">opj_thread_pool_t::signaling_threshold</a>, <a class="el" href="structopj__thread__pool__t.html#a401a98b276c965e0b63efaf9e1369730">opj_thread_pool_t::tls</a>, <a class="el" href="structopj__worker__thread__job__t.html#a89f225764ee25dabc5e374ed277cd286">opj_worker_thread_job_t::user_data</a>, <a class="el" href="structopj__thread__pool__t.html#abad6b35fb3cc6cd8aaaf523de9a4a187">opj_thread_pool_t::waiting_worker_thread_count</a>, <a class="el" href="structopj__thread__pool__t.html#a50c4caa87ba2a6767d909898cc92b37a">opj_thread_pool_t::waiting_worker_thread_list</a>, <a class="el" href="structopj__worker__thread__list__t.html#af36b36ba7fc3ab5febe59faf30c86c7f">opj_worker_thread_list_t::worker_thread</a>, and <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
<p class="reference">Referenced by <a class="el" href="dwt_8c.html#a473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="dwt_8c.html#aaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, <a class="el" href="t1_8h.html#a5df121baefa4293a2c0d0122694e0902">opj_t1_decode_cblks()</a>, and <a class="el" href="t1_8h.html#aa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="a0ced26c80598e49bf3a964bb802130f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ced26c80598e49bf3a964bb802130f1">&#9670;&nbsp;</a></span>opj_thread_pool_wait_completion()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void opj_thread_pool_wait_completion </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
<td class="paramname"><em>tp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>max_remaining_jobs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait that no more than max_remaining_jobs jobs are remaining in the queue of the thread pool. </p>
<p>The aim of this function is to avoid submitting too many jobs while the thread pool cannot cope fast enough with them, which would result potentially in out-of-memory situations with too many job descriptions being queued.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tp</td><td>the thread pool handle </td></tr>
<tr><td class="paramname">max_remaining_jobs</td><td>maximum number of jobs allowed to be queued without waiting. </td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a>, <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="structopj__thread__pool__t.html#ad84a2e09419498cf81c8994f0441b131">opj_thread_pool_t::pending_jobs_count</a>, and <a class="el" href="structopj__thread__pool__t.html#ae68571d1cf6eae577c75df49c2827438">opj_thread_pool_t::signaling_threshold</a>.</p>
<p class="reference">Referenced by <a class="el" href="dwt_8c.html#a473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="dwt_8c.html#aaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, <a class="el" href="t1_8h.html#aa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, and <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>.</p>
</div>
</div>
<a id="a8f4ee11fc0faa44d49f2c341cbf3dc79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f4ee11fc0faa44d49f2c341cbf3dc79">&#9670;&nbsp;</a></span>opj_tls_destroy()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void opj_tls_destroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td>
<td class="paramname"><em>tls</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="structopj__tls__t.html#adfd2bdbeb80b7f067288709b3c3fc1aa">opj_tls_t::key_val</a>, <a class="el" href="structopj__tls__t.html#ae2c441fd26b7ae11a86163d5bebb4d2e">opj_tls_t::key_val_count</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="structopj__tls__key__val__t.html#a3a1ff12d54b55c7d3e30f31b10ad261e">opj_tls_key_val_t::opj_free_func</a>, and <a class="el" href="structopj__tls__key__val__t.html#a58ca4c6fe1d0342a77b89bb240a6f549">opj_tls_key_val_t::value</a>.</p>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="thread_8h.html#ae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, and <a class="el" href="thread_8c.html#ac0a73d8572dbdb91b3a9a10b053f23ec">opj_worker_thread_function()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="a90caa0ff9c1e54033ef1e3010faf03a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90caa0ff9c1e54033ef1e3010faf03a9">&#9670;&nbsp;</a></span>opj_tls_get()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* opj_tls_get </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td>
<td class="paramname"><em>tls</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a thread local value corresponding to the provided key. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tls</td><td>thread local storage handle </td></tr>
<tr><td class="paramname">key</td><td>key whose value to retrieve. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>value associated with the key, or NULL is missing. </dd></dl>
<p class="reference">References <a class="el" href="structopj__tls__key__val__t.html#ad6fb434626095a18d07e1f617c1caa4a">opj_tls_key_val_t::key</a>, <a class="el" href="structopj__tls__t.html#adfd2bdbeb80b7f067288709b3c3fc1aa">opj_tls_t::key_val</a>, <a class="el" href="structopj__tls__t.html#ae2c441fd26b7ae11a86163d5bebb4d2e">opj_tls_t::key_val_count</a>, and <a class="el" href="structopj__tls__key__val__t.html#a58ca4c6fe1d0342a77b89bb240a6f549">opj_tls_key_val_t::value</a>.</p>
<p class="reference">Referenced by <a class="el" href="t1_8c.html#a3a260db0855d38ed19c060139365b1ad">opj_t1_cblk_encode_processor()</a>, and <a class="el" href="t1_8c.html#a4f37cf7aca8eb1313fe5bc320c85ad55">opj_t1_clbl_decode_processor()</a>.</p>
</div>
</div>
<a id="a28308877c7160bae4a21d2b1c8bddfe0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28308877c7160bae4a21d2b1c8bddfe0">&#9670;&nbsp;</a></span>opj_tls_new()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="structopj__tls__t.html">opj_tls_t</a>* opj_tls_new </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="opj__malloc_8c.html#a3fe08bb7876e393dd04332d049a4d53e">opj_calloc()</a>.</p>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="thread_8h.html#a24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>, and <a class="el" href="thread_8c.html#ac0a73d8572dbdb91b3a9a10b053f23ec">opj_worker_thread_function()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
2022-05-13 20:21:13 +02:00
<a id="a35034e7c9fa76c7e1e719bf7900f9ee2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35034e7c9fa76c7e1e719bf7900f9ee2">&#9670;&nbsp;</a></span>opj_tls_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> opj_tls_set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td>
<td class="paramname"><em>tls</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="thread_8h.html#a38f8cdfd288c8ff8963444403549ad6c">opj_tls_free_func</a>&#160;</td>
<td class="paramname"><em>free_func</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a thread local value corresponding to the provided key. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">tls</td><td>thread local storage handle </td></tr>
<tr><td class="paramname">key</td><td>key whose value to set. </td></tr>
<tr><td class="paramname">value</td><td>value to set (may be NULL). </td></tr>
<tr><td class="paramname">free_func</td><td>function to call currently installed value. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>OPJ_TRUE if successful. </dd></dl>
<p class="reference">References <a class="el" href="structopj__tls__key__val__t.html#ad6fb434626095a18d07e1f617c1caa4a">opj_tls_key_val_t::key</a>, <a class="el" href="structopj__tls__t.html#adfd2bdbeb80b7f067288709b3c3fc1aa">opj_tls_t::key_val</a>, <a class="el" href="structopj__tls__t.html#ae2c441fd26b7ae11a86163d5bebb4d2e">opj_tls_t::key_val_count</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="structopj__tls__key__val__t.html#a3a1ff12d54b55c7d3e30f31b10ad261e">opj_tls_key_val_t::opj_free_func</a>, <a class="el" href="opj__malloc_8c.html#aa39cad09aebcf1b795fe829359115812">opj_realloc()</a>, <a class="el" href="openjpeg_8h.html#a04830036d767cba56cbf5ae5bdc481d3">OPJ_TRUE</a>, and <a class="el" href="structopj__tls__key__val__t.html#a58ca4c6fe1d0342a77b89bb240a6f549">opj_tls_key_val_t::value</a>.</p>
<p class="reference">Referenced by <a class="el" href="t1_8c.html#a3a260db0855d38ed19c060139365b1ad">opj_t1_cblk_encode_processor()</a>, and <a class="el" href="t1_8c.html#a4f37cf7aca8eb1313fe5bc320c85ad55">opj_t1_clbl_decode_processor()</a>.</p>
</div>
</div>
<a id="ac0a73d8572dbdb91b3a9a10b053f23ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0a73d8572dbdb91b3a9a10b053f23ec">&#9670;&nbsp;</a></span>opj_worker_thread_function()</h2>
2017-08-10 06:39:58 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void opj_worker_thread_function </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>user_data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
2022-05-13 20:21:13 +02:00
<p class="reference">References <a class="el" href="structopj__worker__thread__job__t.html#ab9dc542136b4596b711e3be011abdd4d">opj_worker_thread_job_t::job_fn</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="opj__malloc_8c.html#a9d7d909f8dc1a2c23313c48645341e81">opj_free()</a>, <a class="el" href="thread_8c.html#a57e6dc05f2283639a2ec0b6884d9691c">opj_thread_pool_get_next_job()</a>, <a class="el" href="thread_8c.html#a8f4ee11fc0faa44d49f2c341cbf3dc79">opj_tls_destroy()</a>, <a class="el" href="thread_8c.html#a28308877c7160bae4a21d2b1c8bddfe0">opj_tls_new()</a>, <a class="el" href="openjpeg_8h.html#a04830036d767cba56cbf5ae5bdc481d3">OPJ_TRUE</a>, <a class="el" href="structopj__worker__thread__t.html#a81267837ab1b9934e3a1cc64680959e7">opj_worker_thread_t::tp</a>, and <a class="el" href="structopj__worker__thread__job__t.html#a89f225764ee25dabc5e374ed277cd286">opj_worker_thread_job_t::user_data</a>.</p>
2017-08-10 06:39:58 +02:00
2022-05-13 20:21:13 +02:00
<p class="reference">Referenced by <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
2017-08-10 06:39:58 +02:00
</div>
</div>
</div><!-- contents -->
2022-05-13 20:21:13 +02:00
<div class="ttc" id="athread_8c_html_a0f3687b35d6f3c395e1156a8499d1632"><div class="ttname"><a href="thread_8c.html#a0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal</a></div><div class="ttdeci">void opj_cond_signal(opj_cond_t *cond)</div><div class="ttdoc">Signal waiting threads on a condition.</div><div class="ttdef"><b>Definition:</b> thread.c:474</div></div>
<div class="ttc" id="athread_8c_html_ab38a90b92a1d294f7e1886e36a405518"><div class="ttname"><a href="thread_8c.html#ab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock</a></div><div class="ttdeci">void opj_mutex_lock(opj_mutex_t *mutex)</div><div class="ttdoc">Lock/acquire the mutex.</div><div class="ttdef"><b>Definition:</b> thread.c:448</div></div>
<div class="ttc" id="athread_8c_html_a6edf64f08cd0b48299800852d52245d6"><div class="ttname"><a href="thread_8c.html#a6edf64f08cd0b48299800852d52245d6">opj_cond_wait</a></div><div class="ttdeci">void opj_cond_wait(opj_cond_t *cond, opj_mutex_t *mutex)</div><div class="ttdoc">Wait for the condition to be signaled.</div><div class="ttdef"><b>Definition:</b> thread.c:468</div></div>
<div class="ttc" id="astructopj__thread__pool__t_html_a818a719866334770dda95c675cb73d63"><div class="ttname"><a href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a></div><div class="ttdeci">opj_mutex_t * mutex</div><div class="ttdef"><b>Definition:</b> thread.c:609</div></div>
<div class="ttc" id="astructopj__thread__pool__t_html_a19d0f595937228552fe62c69cb2f6c44"><div class="ttname"><a href="structopj__thread__pool__t.html#a19d0f595937228552fe62c69cb2f6c44">opj_thread_pool_t::cond</a></div><div class="ttdeci">opj_cond_t * cond</div><div class="ttdef"><b>Definition:</b> thread.c:608</div></div>
<div class="ttc" id="athread_8c_html_acf1f5a5f7f7257663505af02b717272c"><div class="ttname"><a href="thread_8c.html#acf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock</a></div><div class="ttdeci">void opj_mutex_unlock(opj_mutex_t *mutex)</div><div class="ttdoc">Unlock/release the mutex.</div><div class="ttdef"><b>Definition:</b> thread.c:453</div></div>
2017-08-10 06:39:58 +02:00
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
2022-05-13 20:21:13 +02:00
</a> 1.8.17
2017-08-10 06:39:58 +02:00
</small></address>
</body>
</html>