Update for OpenJPEG 2.4.0
[openjpeg.git] / doxygen / group___t_h_r_e_a_d.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.11"/>
7 <title>OpenJPEG: THREAD - Mutex, conditions, threads and thread pools</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <script type="text/javascript" src="jquery.js"></script>
10 <script type="text/javascript" src="dynsections.js"></script>
11 <link href="doxygen.css" rel="stylesheet" type="text/css" />
12 </head>
13 <body>
14 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
15 <div id="titlearea">
16 <table cellspacing="0" cellpadding="0">
17  <tbody>
18  <tr style="height: 56px;">
19   <td id="projectalign" style="padding-left: 0.5em;">
20    <div id="projectname">OpenJPEG
21    &#160;<span id="projectnumber">2.4.0</span>
22    </div>
23   </td>
24  </tr>
25  </tbody>
26 </table>
27 </div>
28 <!-- end header part -->
29 <!-- Generated by Doxygen 1.8.11 -->
30   <div id="navrow1" class="tabs">
31     <ul class="tablist">
32       <li><a href="index.html"><span>Main&#160;Page</span></a></li>
33       <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
34       <li class="current"><a href="modules.html"><span>Modules</span></a></li>
35       <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
36       <li><a href="files.html"><span>Files</span></a></li>
37     </ul>
38   </div>
39 </div><!-- top -->
40 <div class="header">
41   <div class="headertitle">
42 <div class="title">THREAD - Mutex, conditions, threads and thread pools</div>  </div>
43 </div><!--header-->
44 <div class="contents">
45 <table class="memberdecls">
46 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
47 Mutex</h2></td></tr>
48 <tr class="memitem:ga29120af1ce48d5ecd651795f2e427755"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a></td></tr>
49 <tr class="memdesc:ga29120af1ce48d5ecd651795f2e427755"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque type for a mutex.  <a href="#ga29120af1ce48d5ecd651795f2e427755">More...</a><br /></td></tr>
50 <tr class="separator:ga29120af1ce48d5ecd651795f2e427755"><td class="memSeparator" colspan="2">&#160;</td></tr>
51 <tr class="memitem:gaa81ea27e801a8c0cf453b256ab38e067"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gaa81ea27e801a8c0cf453b256ab38e067">opj_mutex_create</a> (void)</td></tr>
52 <tr class="memdesc:gaa81ea27e801a8c0cf453b256ab38e067"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a mutex.  <a href="#gaa81ea27e801a8c0cf453b256ab38e067">More...</a><br /></td></tr>
53 <tr class="separator:gaa81ea27e801a8c0cf453b256ab38e067"><td class="memSeparator" colspan="2">&#160;</td></tr>
54 <tr class="memitem:gab38a90b92a1d294f7e1886e36a405518"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
55 <tr class="memdesc:gab38a90b92a1d294f7e1886e36a405518"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock/acquire the mutex.  <a href="#gab38a90b92a1d294f7e1886e36a405518">More...</a><br /></td></tr>
56 <tr class="separator:gab38a90b92a1d294f7e1886e36a405518"><td class="memSeparator" colspan="2">&#160;</td></tr>
57 <tr class="memitem:gacf1f5a5f7f7257663505af02b717272c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gacf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
58 <tr class="memdesc:gacf1f5a5f7f7257663505af02b717272c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock/release the mutex.  <a href="#gacf1f5a5f7f7257663505af02b717272c">More...</a><br /></td></tr>
59 <tr class="separator:gacf1f5a5f7f7257663505af02b717272c"><td class="memSeparator" colspan="2">&#160;</td></tr>
60 <tr class="memitem:ga66757c34c788b873ad9acfb60a5e008b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga66757c34c788b873ad9acfb60a5e008b">opj_mutex_destroy</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
61 <tr class="memdesc:ga66757c34c788b873ad9acfb60a5e008b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a mutex.  <a href="#ga66757c34c788b873ad9acfb60a5e008b">More...</a><br /></td></tr>
62 <tr class="separator:ga66757c34c788b873ad9acfb60a5e008b"><td class="memSeparator" colspan="2">&#160;</td></tr>
63 </table><table class="memberdecls">
64 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
65 Condition</h2></td></tr>
66 <tr class="memitem:ga439cd27c17f11fc56a911a126811fb87"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a></td></tr>
67 <tr class="memdesc:ga439cd27c17f11fc56a911a126811fb87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque type for a condition.  <a href="#ga439cd27c17f11fc56a911a126811fb87">More...</a><br /></td></tr>
68 <tr class="separator:ga439cd27c17f11fc56a911a126811fb87"><td class="memSeparator" colspan="2">&#160;</td></tr>
69 <tr class="memitem:ga7f8a4c1ce6d9ad2dde1d293fad317522"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga7f8a4c1ce6d9ad2dde1d293fad317522">opj_cond_create</a> (void)</td></tr>
70 <tr class="memdesc:ga7f8a4c1ce6d9ad2dde1d293fad317522"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a condition.  <a href="#ga7f8a4c1ce6d9ad2dde1d293fad317522">More...</a><br /></td></tr>
71 <tr class="separator:ga7f8a4c1ce6d9ad2dde1d293fad317522"><td class="memSeparator" colspan="2">&#160;</td></tr>
72 <tr class="memitem:ga6edf64f08cd0b48299800852d52245d6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga6edf64f08cd0b48299800852d52245d6">opj_cond_wait</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond, <a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *mutex)</td></tr>
73 <tr class="memdesc:ga6edf64f08cd0b48299800852d52245d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the condition to be signaled.  <a href="#ga6edf64f08cd0b48299800852d52245d6">More...</a><br /></td></tr>
74 <tr class="separator:ga6edf64f08cd0b48299800852d52245d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
75 <tr class="memitem:ga0f3687b35d6f3c395e1156a8499d1632"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond)</td></tr>
76 <tr class="memdesc:ga0f3687b35d6f3c395e1156a8499d1632"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal waiting threads on a condition.  <a href="#ga0f3687b35d6f3c395e1156a8499d1632">More...</a><br /></td></tr>
77 <tr class="separator:ga0f3687b35d6f3c395e1156a8499d1632"><td class="memSeparator" colspan="2">&#160;</td></tr>
78 <tr class="memitem:gafba4c2356f6d070d43e5f0d5c71fdbee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gafba4c2356f6d070d43e5f0d5c71fdbee">opj_cond_destroy</a> (<a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *cond)</td></tr>
79 <tr class="memdesc:gafba4c2356f6d070d43e5f0d5c71fdbee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a condition.  <a href="#gafba4c2356f6d070d43e5f0d5c71fdbee">More...</a><br /></td></tr>
80 <tr class="separator:gafba4c2356f6d070d43e5f0d5c71fdbee"><td class="memSeparator" colspan="2">&#160;</td></tr>
81 </table><table class="memberdecls">
82 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
83 Thread</h2></td></tr>
84 <tr class="memitem:gaed72b7b75acb6eaeb620085b01ee365b"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a></td></tr>
85 <tr class="memdesc:gaed72b7b75acb6eaeb620085b01ee365b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque type for a thread handle.  <a href="#gaed72b7b75acb6eaeb620085b01ee365b">More...</a><br /></td></tr>
86 <tr class="separator:gaed72b7b75acb6eaeb620085b01ee365b"><td class="memSeparator" colspan="2">&#160;</td></tr>
87 <tr class="memitem:gae5f9aa8219645e0e836aaf0c453db624"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gae5f9aa8219645e0e836aaf0c453db624">opj_thread_fn</a>) (void *user_data)</td></tr>
88 <tr class="memdesc:gae5f9aa8219645e0e836aaf0c453db624"><td class="mdescLeft">&#160;</td><td class="mdescRight">User function to execute in a thread.  <a href="#gae5f9aa8219645e0e836aaf0c453db624">More...</a><br /></td></tr>
89 <tr class="separator:gae5f9aa8219645e0e836aaf0c453db624"><td class="memSeparator" colspan="2">&#160;</td></tr>
90 <tr class="memitem:ga541be683ba651c8244bde3f0d3650c92"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga541be683ba651c8244bde3f0d3650c92">opj_thread_create</a> (<a class="el" href="group___t_h_r_e_a_d.html#gae5f9aa8219645e0e836aaf0c453db624">opj_thread_fn</a> thread_fn, void *user_data)</td></tr>
91 <tr class="memdesc:ga541be683ba651c8244bde3f0d3650c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new thread.  <a href="#ga541be683ba651c8244bde3f0d3650c92">More...</a><br /></td></tr>
92 <tr class="separator:ga541be683ba651c8244bde3f0d3650c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
93 <tr class="memitem:gad49986b56da75f8609b7c940c17f713f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gad49986b56da75f8609b7c940c17f713f">opj_thread_join</a> (<a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *thread)</td></tr>
94 <tr class="memdesc:gad49986b56da75f8609b7c940c17f713f"><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="#gad49986b56da75f8609b7c940c17f713f">More...</a><br /></td></tr>
95 <tr class="separator:gad49986b56da75f8609b7c940c17f713f"><td class="memSeparator" colspan="2">&#160;</td></tr>
96 </table><table class="memberdecls">
97 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
98 Thread local storage</h2></td></tr>
99 <tr class="memitem:ga9395f97b1e62916dc8b5d2ea4749f74a"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structopj__tls__t.html">opj_tls_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga9395f97b1e62916dc8b5d2ea4749f74a">opj_tls_t</a></td></tr>
100 <tr class="memdesc:ga9395f97b1e62916dc8b5d2ea4749f74a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque type for a thread local storage.  <a href="#ga9395f97b1e62916dc8b5d2ea4749f74a">More...</a><br /></td></tr>
101 <tr class="separator:ga9395f97b1e62916dc8b5d2ea4749f74a"><td class="memSeparator" colspan="2">&#160;</td></tr>
102 <tr class="memitem:ga38f8cdfd288c8ff8963444403549ad6c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga38f8cdfd288c8ff8963444403549ad6c">opj_tls_free_func</a>) (void *value)</td></tr>
103 <tr class="memdesc:ga38f8cdfd288c8ff8963444403549ad6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of the function used to free a TLS value.  <a href="#ga38f8cdfd288c8ff8963444403549ad6c">More...</a><br /></td></tr>
104 <tr class="separator:ga38f8cdfd288c8ff8963444403549ad6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
105 <tr class="memitem:ga90caa0ff9c1e54033ef1e3010faf03a9"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga90caa0ff9c1e54033ef1e3010faf03a9">opj_tls_get</a> (<a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls, int key)</td></tr>
106 <tr class="memdesc:ga90caa0ff9c1e54033ef1e3010faf03a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a thread local value corresponding to the provided key.  <a href="#ga90caa0ff9c1e54033ef1e3010faf03a9">More...</a><br /></td></tr>
107 <tr class="separator:ga90caa0ff9c1e54033ef1e3010faf03a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
108 <tr class="memitem:gab1b97098aabc89f98eca8f8f7274f3e7"><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="group___t_h_r_e_a_d.html#gab1b97098aabc89f98eca8f8f7274f3e7">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="group___t_h_r_e_a_d.html#ga38f8cdfd288c8ff8963444403549ad6c">opj_tls_free_func</a> free_func)</td></tr>
109 <tr class="memdesc:gab1b97098aabc89f98eca8f8f7274f3e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a thread local value corresponding to the provided key.  <a href="#gab1b97098aabc89f98eca8f8f7274f3e7">More...</a><br /></td></tr>
110 <tr class="separator:gab1b97098aabc89f98eca8f8f7274f3e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
111 </table><table class="memberdecls">
112 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
113 Thread pool</h2></td></tr>
114 <tr class="memitem:ga656a5e32341e7433cf6b70e53b002c5e"><td class="memItemLeft" align="right" valign="top">typedef struct <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="group___t_h_r_e_a_d.html#ga656a5e32341e7433cf6b70e53b002c5e">opj_thread_pool_t</a></td></tr>
115 <tr class="memdesc:ga656a5e32341e7433cf6b70e53b002c5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque type for a thread pool.  <a href="#ga656a5e32341e7433cf6b70e53b002c5e">More...</a><br /></td></tr>
116 <tr class="separator:ga656a5e32341e7433cf6b70e53b002c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
117 <tr class="memitem:gaf29983f3245378c30edbef61fe22913b"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gaf29983f3245378c30edbef61fe22913b">opj_job_fn</a>) (void *user_data, <a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls)</td></tr>
118 <tr class="memdesc:gaf29983f3245378c30edbef61fe22913b"><td class="mdescLeft">&#160;</td><td class="mdescRight">User function to execute in a thread.  <a href="#gaf29983f3245378c30edbef61fe22913b">More...</a><br /></td></tr>
119 <tr class="separator:gaf29983f3245378c30edbef61fe22913b"><td class="memSeparator" colspan="2">&#160;</td></tr>
120 <tr class="memitem:ga24a3a1b343df1168a3beb57babfa0916"><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="group___t_h_r_e_a_d.html#ga24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create</a> (int num_threads)</td></tr>
121 <tr class="memdesc:ga24a3a1b343df1168a3beb57babfa0916"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new thread pool.  <a href="#ga24a3a1b343df1168a3beb57babfa0916">More...</a><br /></td></tr>
122 <tr class="separator:ga24a3a1b343df1168a3beb57babfa0916"><td class="memSeparator" colspan="2">&#160;</td></tr>
123 <tr class="memitem:gaf389ecb3a583a30077fc546eef767c89"><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="group___t_h_r_e_a_d.html#gaf389ecb3a583a30077fc546eef767c89">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="group___t_h_r_e_a_d.html#gaf29983f3245378c30edbef61fe22913b">opj_job_fn</a> job_fn, void *user_data)</td></tr>
124 <tr class="memdesc:gaf389ecb3a583a30077fc546eef767c89"><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="#gaf389ecb3a583a30077fc546eef767c89">More...</a><br /></td></tr>
125 <tr class="separator:gaf389ecb3a583a30077fc546eef767c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
126 <tr class="memitem:ga0ced26c80598e49bf3a964bb802130f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga0ced26c80598e49bf3a964bb802130f1">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>
127 <tr class="memdesc:ga0ced26c80598e49bf3a964bb802130f1"><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="#ga0ced26c80598e49bf3a964bb802130f1">More...</a><br /></td></tr>
128 <tr class="separator:ga0ced26c80598e49bf3a964bb802130f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
129 <tr class="memitem:ga4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#ga4faef98a6b8495c63e9e5ce9cf0c3fc3">opj_thread_pool_get_thread_count</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp)</td></tr>
130 <tr class="memdesc:ga4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of threads associated with the thread pool.  <a href="#ga4faef98a6b8495c63e9e5ce9cf0c3fc3">More...</a><br /></td></tr>
131 <tr class="separator:ga4faef98a6b8495c63e9e5ce9cf0c3fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
132 <tr class="memitem:gae44e8b9258d0baa19e3671a382faa33e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy</a> (<a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *tp)</td></tr>
133 <tr class="memdesc:gae44e8b9258d0baa19e3671a382faa33e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a thread pool.  <a href="#gae44e8b9258d0baa19e3671a382faa33e">More...</a><br /></td></tr>
134 <tr class="separator:gae44e8b9258d0baa19e3671a382faa33e"><td class="memSeparator" colspan="2">&#160;</td></tr>
135 </table>
136 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
137 <h2 class="groupheader">Typedef Documentation</h2>
138 <a class="anchor" id="ga439cd27c17f11fc56a911a126811fb87"></a>
139 <div class="memitem">
140 <div class="memproto">
141       <table class="memname">
142         <tr>
143           <td class="memname">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> <a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a></td>
144         </tr>
145       </table>
146 </div><div class="memdoc">
147
148 <p>Opaque type for a condition. </p>
149
150 </div>
151 </div>
152 <a class="anchor" id="gaf29983f3245378c30edbef61fe22913b"></a>
153 <div class="memitem">
154 <div class="memproto">
155       <table class="memname">
156         <tr>
157           <td class="memname">typedef void(* opj_job_fn) (void *user_data, <a class="el" href="structopj__tls__t.html">opj_tls_t</a> *tls)</td>
158         </tr>
159       </table>
160 </div><div class="memdoc">
161
162 <p>User function to execute in a thread. </p>
163 <dl class="params"><dt>Parameters</dt><dd>
164   <table class="params">
165     <tr><td class="paramname">user_data</td><td>user data provided with <a class="el" href="group___t_h_r_e_a_d.html#ga541be683ba651c8244bde3f0d3650c92" title="Creates a new thread. ">opj_thread_create()</a> </td></tr>
166     <tr><td class="paramname">tls</td><td>handle to thread local storage </td></tr>
167   </table>
168   </dd>
169 </dl>
170
171 </div>
172 </div>
173 <a class="anchor" id="ga29120af1ce48d5ecd651795f2e427755"></a>
174 <div class="memitem">
175 <div class="memproto">
176       <table class="memname">
177         <tr>
178           <td class="memname">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> <a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a></td>
179         </tr>
180       </table>
181 </div><div class="memdoc">
182
183 <p>Opaque type for a mutex. </p>
184
185 </div>
186 </div>
187 <a class="anchor" id="gae5f9aa8219645e0e836aaf0c453db624"></a>
188 <div class="memitem">
189 <div class="memproto">
190       <table class="memname">
191         <tr>
192           <td class="memname">typedef void(* opj_thread_fn) (void *user_data)</td>
193         </tr>
194       </table>
195 </div><div class="memdoc">
196
197 <p>User function to execute in a thread. </p>
198 <dl class="params"><dt>Parameters</dt><dd>
199   <table class="params">
200     <tr><td class="paramname">user_data</td><td>user data provided with <a class="el" href="group___t_h_r_e_a_d.html#ga541be683ba651c8244bde3f0d3650c92" title="Creates a new thread. ">opj_thread_create()</a> </td></tr>
201   </table>
202   </dd>
203 </dl>
204
205 </div>
206 </div>
207 <a class="anchor" id="ga656a5e32341e7433cf6b70e53b002c5e"></a>
208 <div class="memitem">
209 <div class="memproto">
210       <table class="memname">
211         <tr>
212           <td class="memname">typedef struct <a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> <a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a></td>
213         </tr>
214       </table>
215 </div><div class="memdoc">
216
217 <p>Opaque type for a thread pool. </p>
218
219 </div>
220 </div>
221 <a class="anchor" id="gaed72b7b75acb6eaeb620085b01ee365b"></a>
222 <div class="memitem">
223 <div class="memproto">
224       <table class="memname">
225         <tr>
226           <td class="memname">typedef struct <a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> <a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a></td>
227         </tr>
228       </table>
229 </div><div class="memdoc">
230
231 <p>Opaque type for a thread handle. </p>
232
233 </div>
234 </div>
235 <a class="anchor" id="ga38f8cdfd288c8ff8963444403549ad6c"></a>
236 <div class="memitem">
237 <div class="memproto">
238       <table class="memname">
239         <tr>
240           <td class="memname">typedef void(* opj_tls_free_func) (void *value)</td>
241         </tr>
242       </table>
243 </div><div class="memdoc">
244
245 <p>Type of the function used to free a TLS value. </p>
246
247 </div>
248 </div>
249 <a class="anchor" id="ga9395f97b1e62916dc8b5d2ea4749f74a"></a>
250 <div class="memitem">
251 <div class="memproto">
252       <table class="memname">
253         <tr>
254           <td class="memname">typedef struct <a class="el" href="structopj__tls__t.html">opj_tls_t</a> <a class="el" href="structopj__tls__t.html">opj_tls_t</a></td>
255         </tr>
256       </table>
257 </div><div class="memdoc">
258
259 <p>Opaque type for a thread local storage. </p>
260
261 </div>
262 </div>
263 <h2 class="groupheader">Function Documentation</h2>
264 <a class="anchor" id="ga7f8a4c1ce6d9ad2dde1d293fad317522"></a>
265 <div class="memitem">
266 <div class="memproto">
267       <table class="memname">
268         <tr>
269           <td class="memname"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a>* opj_cond_create </td>
270           <td>(</td>
271           <td class="paramtype">void&#160;</td>
272           <td class="paramname"></td><td>)</td>
273           <td></td>
274         </tr>
275       </table>
276 </div><div class="memdoc">
277
278 <p>Creates a condition. </p>
279 <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>
280
281 <p>Referenced by <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
282
283 </div>
284 </div>
285 <a class="anchor" id="gafba4c2356f6d070d43e5f0d5c71fdbee"></a>
286 <div class="memitem">
287 <div class="memproto">
288       <table class="memname">
289         <tr>
290           <td class="memname">void opj_cond_destroy </td>
291           <td>(</td>
292           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
293           <td class="paramname"><em>cond</em></td><td>)</td>
294           <td></td>
295         </tr>
296       </table>
297 </div><div class="memdoc">
298
299 <p>Destroy a condition. </p>
300 <dl class="params"><dt>Parameters</dt><dd>
301   <table class="params">
302     <tr><td class="paramname">cond</td><td>the condition to destroy. </td></tr>
303   </table>
304   </dd>
305 </dl>
306
307 <p>Referenced by <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
308
309 </div>
310 </div>
311 <a class="anchor" id="ga0f3687b35d6f3c395e1156a8499d1632"></a>
312 <div class="memitem">
313 <div class="memproto">
314       <table class="memname">
315         <tr>
316           <td class="memname">void opj_cond_signal </td>
317           <td>(</td>
318           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
319           <td class="paramname"><em>cond</em></td><td>)</td>
320           <td></td>
321         </tr>
322       </table>
323 </div><div class="memdoc">
324
325 <p>Signal waiting threads on a condition. </p>
326 <p>One of the thread waiting with <a class="el" href="group___t_h_r_e_a_d.html#ga6edf64f08cd0b48299800852d52245d6" 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="group___t_h_r_e_a_d.html#ga6edf64f08cd0b48299800852d52245d6" title="Wait for the condition to be signaled. ">opj_cond_wait()</a>, in a acquired state. </p><dl class="params"><dt>Parameters</dt><dd>
327   <table class="params">
328     <tr><td class="paramname">cond</td><td>the condition to signal. </td></tr>
329   </table>
330   </dd>
331 </dl>
332
333 <p>Referenced by <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">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="group___t_h_r_e_a_d.html#gaf389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>.</p>
334
335 </div>
336 </div>
337 <a class="anchor" id="ga6edf64f08cd0b48299800852d52245d6"></a>
338 <div class="memitem">
339 <div class="memproto">
340       <table class="memname">
341         <tr>
342           <td class="memname">void opj_cond_wait </td>
343           <td>(</td>
344           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga439cd27c17f11fc56a911a126811fb87">opj_cond_t</a> *&#160;</td>
345           <td class="paramname"><em>cond</em>, </td>
346         </tr>
347         <tr>
348           <td class="paramkey"></td>
349           <td></td>
350           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
351           <td class="paramname"><em>mutex</em>&#160;</td>
352         </tr>
353         <tr>
354           <td></td>
355           <td>)</td>
356           <td></td><td></td>
357         </tr>
358       </table>
359 </div><div class="memdoc">
360
361 <p>Wait for the condition to be signaled. </p>
362 <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="group___t_h_r_e_a_d.html#ga0f3687b35d6f3c395e1156a8499d1632" title="Signal waiting threads on a condition. ">opj_cond_signal()</a>, hence the need to check with an application level mechanism.</p>
363 <p>Waiting thread : </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;opj_mutex_lock(mutex);</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;while( !some_application_level_condition )</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;{</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    opj_cond_wait(cond, mutex);</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;}</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;opj_mutex_unlock(mutex);</div></div><!-- fragment --><p>Signaling thread : </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;opj_mutex_lock(mutex);</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;some_application_level_condition = TRUE;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;opj_cond_signal(cond);</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;opj_mutex_unlock(mutex);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
364   <table class="params">
365     <tr><td class="paramname">cond</td><td>the condition to wait. </td></tr>
366     <tr><td class="paramname">mutex</td><td>the mutex (in acquired state before calling this function) </td></tr>
367   </table>
368   </dd>
369 </dl>
370
371 <p>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="group___t_h_r_e_a_d.html#gaf389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="group___t_h_r_e_a_d.html#ga0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
372
373 </div>
374 </div>
375 <a class="anchor" id="gaa81ea27e801a8c0cf453b256ab38e067"></a>
376 <div class="memitem">
377 <div class="memproto">
378       <table class="memname">
379         <tr>
380           <td class="memname"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a>* opj_mutex_create </td>
381           <td>(</td>
382           <td class="paramtype">void&#160;</td>
383           <td class="paramname"></td><td>)</td>
384           <td></td>
385         </tr>
386       </table>
387 </div><div class="memdoc">
388
389 <p>Creates a mutex. </p>
390 <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>
391
392 <p>Referenced by <a class="el" href="group___t1.html#gaa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, <a class="el" href="group___t_h_r_e_a_d.html#ga24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
393
394 </div>
395 </div>
396 <a class="anchor" id="ga66757c34c788b873ad9acfb60a5e008b"></a>
397 <div class="memitem">
398 <div class="memproto">
399       <table class="memname">
400         <tr>
401           <td class="memname">void opj_mutex_destroy </td>
402           <td>(</td>
403           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
404           <td class="paramname"><em>mutex</em></td><td>)</td>
405           <td></td>
406         </tr>
407       </table>
408 </div><div class="memdoc">
409
410 <p>Destroy a mutex. </p>
411 <dl class="params"><dt>Parameters</dt><dd>
412   <table class="params">
413     <tr><td class="paramname">mutex</td><td>the mutex to destroy. </td></tr>
414   </table>
415   </dd>
416 </dl>
417
418 <p>Referenced by <a class="el" href="group___t1.html#gaa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>, and <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
419
420 </div>
421 </div>
422 <a class="anchor" id="gab38a90b92a1d294f7e1886e36a405518"></a>
423 <div class="memitem">
424 <div class="memproto">
425       <table class="memname">
426         <tr>
427           <td class="memname">void opj_mutex_lock </td>
428           <td>(</td>
429           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
430           <td class="paramname"><em>mutex</em></td><td>)</td>
431           <td></td>
432         </tr>
433       </table>
434 </div><div class="memdoc">
435
436 <p>Lock/acquire the mutex. </p>
437 <dl class="params"><dt>Parameters</dt><dd>
438   <table class="params">
439     <tr><td class="paramname">mutex</td><td>the mutex to acquire. </td></tr>
440   </table>
441   </dd>
442 </dl>
443
444 <p>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="group___t1.html#gab90391839b2f56ca40aaae1b8748ca3c">opj_t1_decode_cblk()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">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="group___t_h_r_e_a_d.html#gaf389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="group___t_h_r_e_a_d.html#ga0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
445
446 </div>
447 </div>
448 <a class="anchor" id="gacf1f5a5f7f7257663505af02b717272c"></a>
449 <div class="memitem">
450 <div class="memproto">
451       <table class="memname">
452         <tr>
453           <td class="memname">void opj_mutex_unlock </td>
454           <td>(</td>
455           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga29120af1ce48d5ecd651795f2e427755">opj_mutex_t</a> *&#160;</td>
456           <td class="paramname"><em>mutex</em></td><td>)</td>
457           <td></td>
458         </tr>
459       </table>
460 </div><div class="memdoc">
461
462 <p>Unlock/release the mutex. </p>
463 <dl class="params"><dt>Parameters</dt><dd>
464   <table class="params">
465     <tr><td class="paramname">mutex</td><td>the mutex to release. </td></tr>
466   </table>
467   </dd>
468 </dl>
469
470 <p>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="group___t1.html#gab90391839b2f56ca40aaae1b8748ca3c">opj_t1_decode_cblk()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">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="group___t_h_r_e_a_d.html#gaf389ecb3a583a30077fc546eef767c89">opj_thread_pool_submit_job()</a>, and <a class="el" href="group___t_h_r_e_a_d.html#ga0ced26c80598e49bf3a964bb802130f1">opj_thread_pool_wait_completion()</a>.</p>
471
472 </div>
473 </div>
474 <a class="anchor" id="ga541be683ba651c8244bde3f0d3650c92"></a>
475 <div class="memitem">
476 <div class="memproto">
477       <table class="memname">
478         <tr>
479           <td class="memname"><a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a>* opj_thread_create </td>
480           <td>(</td>
481           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#gae5f9aa8219645e0e836aaf0c453db624">opj_thread_fn</a>&#160;</td>
482           <td class="paramname"><em>thread_fn</em>, </td>
483         </tr>
484         <tr>
485           <td class="paramkey"></td>
486           <td></td>
487           <td class="paramtype">void *&#160;</td>
488           <td class="paramname"><em>user_data</em>&#160;</td>
489         </tr>
490         <tr>
491           <td></td>
492           <td>)</td>
493           <td></td><td></td>
494         </tr>
495       </table>
496 </div><div class="memdoc">
497
498 <p>Creates a new thread. </p>
499 <dl class="params"><dt>Parameters</dt><dd>
500   <table class="params">
501     <tr><td class="paramname">thread_fn</td><td>Function to run in the new thread. </td></tr>
502     <tr><td class="paramname">user_data</td><td>user data provided to the thread function. Might be NULL. </td></tr>
503   </table>
504   </dd>
505 </dl>
506 <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>
507
508 <p>Referenced by <a class="el" href="thread_8c.html#acdca1ecb372546840fdd9d5d5badce07">opj_thread_pool_setup()</a>.</p>
509
510 </div>
511 </div>
512 <a class="anchor" id="gad49986b56da75f8609b7c940c17f713f"></a>
513 <div class="memitem">
514 <div class="memproto">
515       <table class="memname">
516         <tr>
517           <td class="memname">void opj_thread_join </td>
518           <td>(</td>
519           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#gaed72b7b75acb6eaeb620085b01ee365b">opj_thread_t</a> *&#160;</td>
520           <td class="paramname"><em>thread</em></td><td>)</td>
521           <td></td>
522         </tr>
523       </table>
524 </div><div class="memdoc">
525
526 <p>Wait for a thread to be finished and release associated resources to the thread handle. </p>
527 <dl class="params"><dt>Parameters</dt><dd>
528   <table class="params">
529     <tr><td class="paramname">thread</td><td>the thread to wait for being finished. </td></tr>
530   </table>
531   </dd>
532 </dl>
533
534 <p>Referenced by <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>.</p>
535
536 </div>
537 </div>
538 <a class="anchor" id="ga24a3a1b343df1168a3beb57babfa0916"></a>
539 <div class="memitem">
540 <div class="memproto">
541       <table class="memname">
542         <tr>
543           <td class="memname"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a>* opj_thread_pool_create </td>
544           <td>(</td>
545           <td class="paramtype">int&#160;</td>
546           <td class="paramname"><em>num_threads</em></td><td>)</td>
547           <td></td>
548         </tr>
549       </table>
550 </div><div class="memdoc">
551
552 <p>Create a new thread pool. </p>
553 <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>
554 <dl class="params"><dt>Parameters</dt><dd>
555   <table class="params">
556     <tr><td class="paramname">num_threads</td><td>the number of threads to allocate for this thread pool. </td></tr>
557   </table>
558   </dd>
559 </dl>
560 <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>
561
562 <p>References <a class="el" href="structopj__thread__pool__t.html#a818a719866334770dda95c675cb73d63">opj_thread_pool_t::mutex</a>, <a class="el" href="group___m_i_s_c.html#ga7fe6dfcb0a623dbec30daf0f48624bf7">opj_calloc()</a>, <a class="el" href="group___m_i_s_c.html#ga2bd00e2482ae36197631bde0665cfdfe">opj_free()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gaa81ea27e801a8c0cf453b256ab38e067">opj_mutex_create()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">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>
563
564 <p>Referenced by <a class="el" href="bench__dwt_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, <a class="el" href="group___j2_k.html#gad3c2b25f4d5a5f6fd4b442bc7210f6da">opj_j2k_create_compress()</a>, <a class="el" href="j2k_8h.html#ad76bb79d4d63030222ebf3dbe3fe86cf">opj_j2k_create_decompress()</a>, and <a class="el" href="group___j2_k.html#gabecf91393e6703f8be5006b19df1be22">opj_j2k_set_threads()</a>.</p>
565
566 </div>
567 </div>
568 <a class="anchor" id="gae44e8b9258d0baa19e3671a382faa33e"></a>
569 <div class="memitem">
570 <div class="memproto">
571       <table class="memname">
572         <tr>
573           <td class="memname">void opj_thread_pool_destroy </td>
574           <td>(</td>
575           <td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
576           <td class="paramname"><em>tp</em></td><td>)</td>
577           <td></td>
578         </tr>
579       </table>
580 </div><div class="memdoc">
581
582 <p>Destroy a thread pool. </p>
583 <dl class="params"><dt>Parameters</dt><dd>
584   <table class="params">
585     <tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
586   </table>
587   </dd>
588 </dl>
589
590 <p>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="group___t_h_r_e_a_d.html#gafba4c2356f6d070d43e5f0d5c71fdbee">opj_cond_destroy()</a>, <a class="el" href="group___t_h_r_e_a_d.html#ga0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal()</a>, <a class="el" href="group___m_i_s_c.html#ga2bd00e2482ae36197631bde0665cfdfe">opj_free()</a>, <a class="el" href="group___t_h_r_e_a_d.html#ga66757c34c788b873ad9acfb60a5e008b">opj_mutex_destroy()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gacf1f5a5f7f7257663505af02b717272c">opj_mutex_unlock()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gad49986b56da75f8609b7c940c17f713f">opj_thread_join()</a>, <a class="el" href="group___t_h_r_e_a_d.html#ga0ced26c80598e49bf3a964bb802130f1">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>
591
592 <p>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="group___j2_k.html#gabecf91393e6703f8be5006b19df1be22">opj_j2k_set_threads()</a>, and <a class="el" href="group___t_h_r_e_a_d.html#ga24a3a1b343df1168a3beb57babfa0916">opj_thread_pool_create()</a>.</p>
593
594 </div>
595 </div>
596 <a class="anchor" id="ga4faef98a6b8495c63e9e5ce9cf0c3fc3"></a>
597 <div class="memitem">
598 <div class="memproto">
599       <table class="memname">
600         <tr>
601           <td class="memname">int opj_thread_pool_get_thread_count </td>
602           <td>(</td>
603           <td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
604           <td class="paramname"><em>tp</em></td><td>)</td>
605           <td></td>
606         </tr>
607       </table>
608 </div><div class="memdoc">
609
610 <p>Return the number of threads associated with the thread pool. </p>
611 <dl class="params"><dt>Parameters</dt><dd>
612   <table class="params">
613     <tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
614   </table>
615   </dd>
616 </dl>
617 <dl class="section return"><dt>Returns</dt><dd>number of threads associated with the thread pool. </dd></dl>
618
619 <p>References <a class="el" href="structopj__thread__pool__t.html#a43fd14e3ba8409a0fac589a6dd4e7ee1">opj_thread_pool_t::worker_threads_count</a>.</p>
620
621 <p>Referenced by <a class="el" href="group___d_w_t.html#ga473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="group___d_w_t.html#gaaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, and <a class="el" href="group___t1.html#ga5df121baefa4293a2c0d0122694e0902">opj_t1_decode_cblks()</a>.</p>
622
623 </div>
624 </div>
625 <a class="anchor" id="gaf389ecb3a583a30077fc546eef767c89"></a>
626 <div class="memitem">
627 <div class="memproto">
628       <table class="memname">
629         <tr>
630           <td class="memname"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> opj_thread_pool_submit_job </td>
631           <td>(</td>
632           <td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
633           <td class="paramname"><em>tp</em>, </td>
634         </tr>
635         <tr>
636           <td class="paramkey"></td>
637           <td></td>
638           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#gaf29983f3245378c30edbef61fe22913b">opj_job_fn</a>&#160;</td>
639           <td class="paramname"><em>job_fn</em>, </td>
640         </tr>
641         <tr>
642           <td class="paramkey"></td>
643           <td></td>
644           <td class="paramtype">void *&#160;</td>
645           <td class="paramname"><em>user_data</em>&#160;</td>
646         </tr>
647         <tr>
648           <td></td>
649           <td>)</td>
650           <td></td><td></td>
651         </tr>
652       </table>
653 </div><div class="memdoc">
654
655 <p>Submit a new job to be run by one of the thread in the thread pool. </p>
656 <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>
657 <dl class="params"><dt>Parameters</dt><dd>
658   <table class="params">
659     <tr><td class="paramname">tp</td><td>the thread pool handle. </td></tr>
660     <tr><td class="paramname">job_fn</td><td>Function to run. Must not be NULL. </td></tr>
661     <tr><td class="paramname">user_data</td><td>User data provided to thread_fn. </td></tr>
662   </table>
663   </dd>
664 </dl>
665 <dl class="section return"><dt>Returns</dt><dd>OPJ_TRUE if the job was successfully submitted. </dd></dl>
666
667 <p>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="group___t_h_r_e_a_d.html#ga0f3687b35d6f3c395e1156a8499d1632">opj_cond_signal()</a>, <a class="el" href="group___t_h_r_e_a_d.html#ga6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="openjpeg_8h.html#ac672bfd7db39c609e828acb07a321964">OPJ_FALSE</a>, <a class="el" href="group___m_i_s_c.html#ga2bd00e2482ae36197631bde0665cfdfe">opj_free()</a>, <a class="el" href="group___m_i_s_c.html#ga49c70931cbed786f6eef5f095bcb2917">opj_malloc()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gacf1f5a5f7f7257663505af02b717272c">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>
668
669 <p>Referenced by <a class="el" href="group___d_w_t.html#ga473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="group___d_w_t.html#gaaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, <a class="el" href="group___t1.html#ga5df121baefa4293a2c0d0122694e0902">opj_t1_decode_cblks()</a>, and <a class="el" href="group___t1.html#gaa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>.</p>
670
671 </div>
672 </div>
673 <a class="anchor" id="ga0ced26c80598e49bf3a964bb802130f1"></a>
674 <div class="memitem">
675 <div class="memproto">
676       <table class="memname">
677         <tr>
678           <td class="memname">void opj_thread_pool_wait_completion </td>
679           <td>(</td>
680           <td class="paramtype"><a class="el" href="structopj__thread__pool__t.html">opj_thread_pool_t</a> *&#160;</td>
681           <td class="paramname"><em>tp</em>, </td>
682         </tr>
683         <tr>
684           <td class="paramkey"></td>
685           <td></td>
686           <td class="paramtype">int&#160;</td>
687           <td class="paramname"><em>max_remaining_jobs</em>&#160;</td>
688         </tr>
689         <tr>
690           <td></td>
691           <td>)</td>
692           <td></td><td></td>
693         </tr>
694       </table>
695 </div><div class="memdoc">
696
697 <p>Wait that no more than max_remaining_jobs jobs are remaining in the queue of the thread pool. </p>
698 <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>
699 <dl class="params"><dt>Parameters</dt><dd>
700   <table class="params">
701     <tr><td class="paramname">tp</td><td>the thread pool handle </td></tr>
702     <tr><td class="paramname">max_remaining_jobs</td><td>maximum number of jobs allowed to be queued without waiting. </td></tr>
703   </table>
704   </dd>
705 </dl>
706
707 <p>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="group___t_h_r_e_a_d.html#ga6edf64f08cd0b48299800852d52245d6">opj_cond_wait()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gab38a90b92a1d294f7e1886e36a405518">opj_mutex_lock()</a>, <a class="el" href="group___t_h_r_e_a_d.html#gacf1f5a5f7f7257663505af02b717272c">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>
708
709 <p>Referenced by <a class="el" href="group___d_w_t.html#ga473550255363b8acb0c9b10a6dbac434">opj_dwt_decode_tile()</a>, <a class="el" href="dwt_8c.html#af833f69ca2dd4480b97b2afd7ea0322b">opj_dwt_decode_tile_97()</a>, <a class="el" href="group___d_w_t.html#gaaae701033c6732995e99ce22d8bffba8">opj_dwt_encode_procedure()</a>, <a class="el" href="group___t1.html#gaa892d07bb383a4dafa51506cf23740a4">opj_t1_encode_cblks()</a>, <a class="el" href="tcd_8c.html#a61608d1a920574e556d417a4b0e23a3a">opj_tcd_t1_decode()</a>, and <a class="el" href="group___t_h_r_e_a_d.html#gae44e8b9258d0baa19e3671a382faa33e">opj_thread_pool_destroy()</a>.</p>
710
711 </div>
712 </div>
713 <a class="anchor" id="ga90caa0ff9c1e54033ef1e3010faf03a9"></a>
714 <div class="memitem">
715 <div class="memproto">
716       <table class="memname">
717         <tr>
718           <td class="memname">void* opj_tls_get </td>
719           <td>(</td>
720           <td class="paramtype"><a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td>
721           <td class="paramname"><em>tls</em>, </td>
722         </tr>
723         <tr>
724           <td class="paramkey"></td>
725           <td></td>
726           <td class="paramtype">int&#160;</td>
727           <td class="paramname"><em>key</em>&#160;</td>
728         </tr>
729         <tr>
730           <td></td>
731           <td>)</td>
732           <td></td><td></td>
733         </tr>
734       </table>
735 </div><div class="memdoc">
736
737 <p>Get a thread local value corresponding to the provided key. </p>
738 <dl class="params"><dt>Parameters</dt><dd>
739   <table class="params">
740     <tr><td class="paramname">tls</td><td>thread local storage handle </td></tr>
741     <tr><td class="paramname">key</td><td>key whose value to retrieve. </td></tr>
742   </table>
743   </dd>
744 </dl>
745 <dl class="section return"><dt>Returns</dt><dd>value associated with the key, or NULL is missing. </dd></dl>
746
747 <p>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>
748
749 <p>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>
750
751 </div>
752 </div>
753 <a class="anchor" id="gab1b97098aabc89f98eca8f8f7274f3e7"></a>
754 <div class="memitem">
755 <div class="memproto">
756       <table class="memname">
757         <tr>
758           <td class="memname"><a class="el" href="openjpeg_8h.html#abb5dad6294f4611f1925388e919b16f4">OPJ_BOOL</a> opj_tls_set </td>
759           <td>(</td>
760           <td class="paramtype"><a class="el" href="structopj__tls__t.html">opj_tls_t</a> *&#160;</td>
761           <td class="paramname"><em>tls</em>, </td>
762         </tr>
763         <tr>
764           <td class="paramkey"></td>
765           <td></td>
766           <td class="paramtype">int&#160;</td>
767           <td class="paramname"><em>key</em>, </td>
768         </tr>
769         <tr>
770           <td class="paramkey"></td>
771           <td></td>
772           <td class="paramtype">void *&#160;</td>
773           <td class="paramname"><em>value</em>, </td>
774         </tr>
775         <tr>
776           <td class="paramkey"></td>
777           <td></td>
778           <td class="paramtype"><a class="el" href="group___t_h_r_e_a_d.html#ga38f8cdfd288c8ff8963444403549ad6c">opj_tls_free_func</a>&#160;</td>
779           <td class="paramname"><em>free_func</em>&#160;</td>
780         </tr>
781         <tr>
782           <td></td>
783           <td>)</td>
784           <td></td><td></td>
785         </tr>
786       </table>
787 </div><div class="memdoc">
788
789 <p>Set a thread local value corresponding to the provided key. </p>
790 <dl class="params"><dt>Parameters</dt><dd>
791   <table class="params">
792     <tr><td class="paramname">tls</td><td>thread local storage handle </td></tr>
793     <tr><td class="paramname">key</td><td>key whose value to set. </td></tr>
794     <tr><td class="paramname">value</td><td>value to set (may be NULL). </td></tr>
795     <tr><td class="paramname">free_func</td><td>function to call currently installed value. </td></tr>
796   </table>
797   </dd>
798 </dl>
799 <dl class="section return"><dt>Returns</dt><dd>OPJ_TRUE if successful. </dd></dl>
800
801 <p>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="group___m_i_s_c.html#ga95862b2a456efdc436c61beba816fb25">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>
802
803 <p>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>
804
805 </div>
806 </div>
807 </div><!-- contents -->
808 <!-- start footer part -->
809 <hr class="footer"/><address class="footer"><small>
810 Generated by &#160;<a href="http://www.doxygen.org/index.html">
811 <img class="footer" src="doxygen.png" alt="doxygen"/>
812 </a> 1.8.11
813 </small></address>
814 </body>
815 </html>