1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>/home/tau/parallel2/sys/src/mth/massivethreads/include/myth/myth.h</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.51 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="myth.h"></a>myth.h</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#myth.h" >myth.h</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_init" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">myth_init</a></td><td class=SDescription>Initialize MassiveThreads library with default parameters (see <a href="#myth_init_ex" class=LFunction id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">myth_init_ex</a>). </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_init_ex" id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">myth_init_ex</a></td><td class=SDescription>Initialize MassiveThreads library with the specified global attributes. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_fini" id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">myth_fini</a></td><td class=SDescription>Finalize MassiveThreads.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_globalattr_init" id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_globalattr_destroy" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">myth_globalattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_globalattr_get_stacksize" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">myth_globalattr_get_stacksize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_globalattr_set_stacksize" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">myth_globalattr_set_stacksize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_globalattr_get_n_workers" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">myth_globalattr_get_n_workers</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_globalattr_set_n_workers" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">myth_globalattr_set_n_workers</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_globalattr_get_bind_workers" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">myth_globalattr_get_bind_workers</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_globalattr_set_bind_workers" id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">myth_globalattr_set_bind_workers</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_create" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">myth_create</a></td><td class=SDescription>Create a new user-level thread executing func(arg) with default options. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_create_ex" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">myth_create_ex</a></td><td class=SDescription>Create a new user-level thread executing func(arg) with specified options.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_exit" id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">myth_exit</a></td><td class=SDescription>Terminate the calling user-level thread.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_join" id=link16 onMouseOver="ShowTip(event, 'tt15', 'link16')" onMouseOut="HideTip('tt15')">myth_join</a></td><td class=SDescription>Wait for the specified thread th to finish.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_create_join_many_ex" id=link17 onMouseOver="ShowTip(event, 'tt16', 'link17')" onMouseOut="HideTip('tt16')">myth_create_join_many_ex</a></td><td class=SDescription>Create many user-level threads executing the same function with various arguments and attributes and wait for them to complete.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_create_join_various_ex" id=link18 onMouseOver="ShowTip(event, 'tt17', 'link18')" onMouseOut="HideTip('tt17')">myth_create_join_various_ex</a></td><td class=SDescription>Create many user-level threads executing various functions with various arguments and attributes and wait for them to complete. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_detach" id=link19 onMouseOver="ShowTip(event, 'tt18', 'link19')" onMouseOut="HideTip('tt18')">myth_detach</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_is_myth_worker" id=link20 onMouseOver="ShowTip(event, 'tt19', 'link20')" onMouseOut="HideTip('tt19')">myth_is_myth_worker</a></td><td class=SDescription>1 if the calling OS-level thread is a massivethreads worker. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_self" id=link21 onMouseOver="ShowTip(event, 'tt20', 'link21')" onMouseOut="HideTip('tt20')">myth_self</a></td><td class=SDescription>The identifier of the calling thread.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_equal" id=link22 onMouseOver="ShowTip(event, 'tt21', 'link22')" onMouseOut="HideTip('tt21')">myth_equal</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_thread_attr_init" id=link23 onMouseOver="ShowTip(event, 'tt22', 'link23')" onMouseOut="HideTip('tt22')">myth_thread_attr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_thread_attr_getdetachstate" id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">myth_thread_attr_getdetachstate</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_thread_attr_setdetachstate" id=link25 onMouseOver="ShowTip(event, 'tt24', 'link25')" onMouseOut="HideTip('tt24')">myth_thread_attr_setdetachstate</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_thread_attr_getguardsize" id=link26 onMouseOver="ShowTip(event, 'tt25', 'link26')" onMouseOut="HideTip('tt25')">myth_thread_attr_getguardsize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_thread_attr_setguardsize" id=link27 onMouseOver="ShowTip(event, 'tt26', 'link27')" onMouseOut="HideTip('tt26')">myth_thread_attr_setguardsize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_thread_attr_getstacksize" id=link28 onMouseOver="ShowTip(event, 'tt27', 'link28')" onMouseOut="HideTip('tt27')">myth_thread_attr_getstacksize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_thread_attr_setstacksize" id=link29 onMouseOver="ShowTip(event, 'tt28', 'link29')" onMouseOut="HideTip('tt28')">myth_thread_attr_setstacksize</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_thread_attr_getstack" id=link30 onMouseOver="ShowTip(event, 'tt29', 'link30')" onMouseOut="HideTip('tt29')">myth_thread_attr_getstack</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_thread_attr_setstack" id=link31 onMouseOver="ShowTip(event, 'tt30', 'link31')" onMouseOut="HideTip('tt30')">myth_thread_attr_setstack</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_getattr_default_np" id=link32 onMouseOver="ShowTip(event, 'tt31', 'link32')" onMouseOut="HideTip('tt31')">myth_getattr_default_np</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_getattr_np" id=link33 onMouseOver="ShowTip(event, 'tt32', 'link33')" onMouseOut="HideTip('tt32')">myth_getattr_np</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_getconcurrency" id=link34 onMouseOver="ShowTip(event, 'tt33', 'link34')" onMouseOut="HideTip('tt33')">myth_getconcurrency</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_yield_ex" id=link35 onMouseOver="ShowTip(event, 'tt34', 'link35')" onMouseOut="HideTip('tt34')">myth_yield_ex</a></td><td class=SDescription>Yield execution to another user-level thread.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_yield" id=link36 onMouseOver="ShowTip(event, 'tt35', 'link36')" onMouseOut="HideTip('tt35')">myth_yield</a></td><td class=SDescription>it is equivalent to myth_yield_ex(myth_yield_option_half_half); with probability 1/2, try to yield to a thread in the local queue and if none is found try to steal a thread from a remote queue. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_setcancelstate" id=link37 onMouseOver="ShowTip(event, 'tt36', 'link37')" onMouseOut="HideTip('tt36')">myth_setcancelstate</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_setcanceltype" id=link38 onMouseOver="ShowTip(event, 'tt37', 'link38')" onMouseOut="HideTip('tt37')">myth_setcanceltype</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_cancel" id=link39 onMouseOver="ShowTip(event, 'tt38', 'link39')" onMouseOut="HideTip('tt38')">myth_cancel</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_testcancel" id=link40 onMouseOver="ShowTip(event, 'tt39', 'link40')" onMouseOut="HideTip('tt39')">myth_testcancel</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Types" >Types</a></td><td class=SDescription></td></tr><tr class="SType SIndent1 SMarked"><td class=SEntry><a href="#myth_once_t" >myth_once_t</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_once" id=link41 onMouseOver="ShowTip(event, 'tt40', 'link41')" onMouseOut="HideTip('tt40')">myth_once</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_mutex_init" id=link42 onMouseOver="ShowTip(event, 'tt41', 'link42')" onMouseOut="HideTip('tt41')">myth_mutex_init</a></td><td class=SDescription>Initialize a mutex.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_mutex_destroy" id=link43 onMouseOver="ShowTip(event, 'tt42', 'link43')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a></td><td class=SDescription>Destroy a mutex.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_mutex_trylock" id=link44 onMouseOver="ShowTip(event, 'tt43', 'link44')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a></td><td class=SDescription>Try to lock a mutex.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_mutex_lock" id=link45 onMouseOver="ShowTip(event, 'tt44', 'link45')" onMouseOut="HideTip('tt44')">myth_mutex_lock</a></td><td class=SDescription>Lock a mutex.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_mutex_timedlock" id=link46 onMouseOver="ShowTip(event, 'tt45', 'link46')" onMouseOut="HideTip('tt45')">myth_mutex_timedlock</a></td><td class=SDescription>Lock a mutex.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_mutex_unlock" id=link47 onMouseOver="ShowTip(event, 'tt46', 'link47')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></td><td class=SDescription>Unlock a mutex.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_mutexattr_init" id=link48 onMouseOver="ShowTip(event, 'tt47', 'link48')" onMouseOut="HideTip('tt47')">myth_mutexattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_mutexattr_destroy" id=link49 onMouseOver="ShowTip(event, 'tt48', 'link49')" onMouseOut="HideTip('tt48')">myth_mutexattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_mutexattr_gettype" id=link50 onMouseOver="ShowTip(event, 'tt49', 'link50')" onMouseOut="HideTip('tt49')">myth_mutexattr_gettype</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_mutexattr_settype" id=link51 onMouseOver="ShowTip(event, 'tt50', 'link51')" onMouseOut="HideTip('tt50')">myth_mutexattr_settype</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlock_init" id=link52 onMouseOver="ShowTip(event, 'tt51', 'link52')" onMouseOut="HideTip('tt51')">myth_rwlock_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlock_destroy" id=link53 onMouseOver="ShowTip(event, 'tt52', 'link53')" onMouseOut="HideTip('tt52')">myth_rwlock_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlock_rdlock" id=link54 onMouseOver="ShowTip(event, 'tt53', 'link54')" onMouseOut="HideTip('tt53')">myth_rwlock_rdlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlock_tryrdlock" id=link55 onMouseOver="ShowTip(event, 'tt54', 'link55')" onMouseOut="HideTip('tt54')">myth_rwlock_tryrdlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlock_timedrdlock" id=link56 onMouseOver="ShowTip(event, 'tt55', 'link56')" onMouseOut="HideTip('tt55')">myth_rwlock_timedrdlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlock_wrlock" id=link57 onMouseOver="ShowTip(event, 'tt56', 'link57')" onMouseOut="HideTip('tt56')">myth_rwlock_wrlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlock_trywrlock" id=link58 onMouseOver="ShowTip(event, 'tt57', 'link58')" onMouseOut="HideTip('tt57')">myth_rwlock_trywrlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlock_timedwrlock" id=link59 onMouseOver="ShowTip(event, 'tt58', 'link59')" onMouseOut="HideTip('tt58')">myth_rwlock_timedwrlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlock_unlock" id=link60 onMouseOver="ShowTip(event, 'tt59', 'link60')" onMouseOut="HideTip('tt59')">myth_rwlock_unlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlockattr_init" id=link61 onMouseOver="ShowTip(event, 'tt60', 'link61')" onMouseOut="HideTip('tt60')">myth_rwlockattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlockattr_destroy" id=link62 onMouseOver="ShowTip(event, 'tt61', 'link62')" onMouseOut="HideTip('tt61')">myth_rwlockattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_rwlockattr_getkind" id=link63 onMouseOver="ShowTip(event, 'tt62', 'link63')" onMouseOut="HideTip('tt62')">myth_rwlockattr_getkind</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_rwlockattr_setkind" id=link64 onMouseOver="ShowTip(event, 'tt63', 'link64')" onMouseOut="HideTip('tt63')">myth_rwlockattr_setkind</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_cond_init" id=link65 onMouseOver="ShowTip(event, 'tt64', 'link65')" onMouseOut="HideTip('tt64')">myth_cond_init</a></td><td class=SDescription>Initialize a condition variable.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_cond_destroy" id=link66 onMouseOver="ShowTip(event, 'tt65', 'link66')" onMouseOut="HideTip('tt65')">myth_cond_destroy</a></td><td class=SDescription>Destroy a condition variable.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_cond_signal" id=link67 onMouseOver="ShowTip(event, 'tt66', 'link67')" onMouseOut="HideTip('tt66')">myth_cond_signal</a></td><td class=SDescription>Wake up at least one thread blocking on a condition variable.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_cond_broadcast" id=link68 onMouseOver="ShowTip(event, 'tt67', 'link68')" onMouseOut="HideTip('tt67')">myth_cond_broadcast</a></td><td class=SDescription>Wake up all threads blocking on a condition variable.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_cond_wait" id=link69 onMouseOver="ShowTip(event, 'tt68', 'link69')" onMouseOut="HideTip('tt68')">myth_cond_wait</a></td><td class=SDescription>Atomically unlock a mutex and block on a condition variable.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_cond_timedwait" id=link70 onMouseOver="ShowTip(event, 'tt69', 'link70')" onMouseOut="HideTip('tt69')">myth_cond_timedwait</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_condattr_init" id=link71 onMouseOver="ShowTip(event, 'tt70', 'link71')" onMouseOut="HideTip('tt70')">myth_condattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_condattr_destroy" id=link72 onMouseOver="ShowTip(event, 'tt71', 'link72')" onMouseOut="HideTip('tt71')">myth_condattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_barrier_init" id=link73 onMouseOver="ShowTip(event, 'tt72', 'link73')" onMouseOut="HideTip('tt72')">myth_barrier_init</a></td><td class=SDescription>Initialize a barrier.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_barrier_destroy" id=link74 onMouseOver="ShowTip(event, 'tt73', 'link74')" onMouseOut="HideTip('tt73')">myth_barrier_destroy</a></td><td class=SDescription>Destroy a barrier.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_barrier_wait" id=link75 onMouseOver="ShowTip(event, 'tt74', 'link75')" onMouseOut="HideTip('tt74')">myth_barrier_wait</a></td><td class=SDescription>Wait on a barrier.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_barrierattr_init" id=link76 onMouseOver="ShowTip(event, 'tt75', 'link76')" onMouseOut="HideTip('tt75')">myth_barrierattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_barrierattr_destroy" id=link77 onMouseOver="ShowTip(event, 'tt76', 'link77')" onMouseOut="HideTip('tt76')">myth_barrierattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_join_counter_init" id=link78 onMouseOver="ShowTip(event, 'tt77', 'link78')" onMouseOut="HideTip('tt77')">myth_join_counter_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_join_counter_wait" id=link79 onMouseOver="ShowTip(event, 'tt78', 'link79')" onMouseOut="HideTip('tt78')">myth_join_counter_wait</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_join_counter_dec" id=link80 onMouseOver="ShowTip(event, 'tt79', 'link80')" onMouseOut="HideTip('tt79')">myth_join_counter_dec</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_join_counterattr_init" id=link81 onMouseOver="ShowTip(event, 'tt80', 'link81')" onMouseOut="HideTip('tt80')">myth_join_counterattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_join_counterattr_destroy" id=link82 onMouseOver="ShowTip(event, 'tt81', 'link82')" onMouseOut="HideTip('tt81')">myth_join_counterattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_felock_init" id=link83 onMouseOver="ShowTip(event, 'tt82', 'link83')" onMouseOut="HideTip('tt82')">myth_felock_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_felock_destroy" id=link84 onMouseOver="ShowTip(event, 'tt83', 'link84')" onMouseOut="HideTip('tt83')">myth_felock_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_felock_lock" id=link85 onMouseOver="ShowTip(event, 'tt84', 'link85')" onMouseOut="HideTip('tt84')">myth_felock_lock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_felock_unlock" id=link86 onMouseOver="ShowTip(event, 'tt85', 'link86')" onMouseOut="HideTip('tt85')">myth_felock_unlock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_felock_wait_and_lock" id=link87 onMouseOver="ShowTip(event, 'tt86', 'link87')" onMouseOut="HideTip('tt86')">myth_felock_wait_and_lock</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_felock_mark_and_signal" id=link88 onMouseOver="ShowTip(event, 'tt87', 'link88')" onMouseOut="HideTip('tt87')">myth_felock_mark_and_signal</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_felock_status" id=link89 onMouseOver="ShowTip(event, 'tt88', 'link89')" onMouseOut="HideTip('tt88')">myth_felock_status</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_felockattr_init" id=link90 onMouseOver="ShowTip(event, 'tt89', 'link90')" onMouseOut="HideTip('tt89')">myth_felockattr_init</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_felockattr_destroy" id=link91 onMouseOver="ShowTip(event, 'tt90', 'link91')" onMouseOut="HideTip('tt90')">myth_felockattr_destroy</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_uncond_init" id=link92 onMouseOver="ShowTip(event, 'tt91', 'link92')" onMouseOut="HideTip('tt91')">myth_uncond_init</a></td><td class=SDescription>initialize an uncondition variable.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_uncond_destroy" id=link93 onMouseOver="ShowTip(event, 'tt92', 'link93')" onMouseOut="HideTip('tt92')">myth_uncond_destroy</a></td><td class=SDescription>destroy an uncondition variable.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_uncond_wait" id=link94 onMouseOver="ShowTip(event, 'tt93', 'link94')" onMouseOut="HideTip('tt93')">myth_uncond_wait</a></td><td class=SDescription>block on an uncondition variable, to be waken up later by myth_uncond_signal. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_uncond_signal" id=link95 onMouseOver="ShowTip(event, 'tt94', 'link95')" onMouseOut="HideTip('tt94')">myth_uncond_signal</a></td><td class=SDescription>unblock the thread blocking on uncond. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_key_create" id=link96 onMouseOver="ShowTip(event, 'tt95', 'link96')" onMouseOut="HideTip('tt95')">myth_key_create</a></td><td class=SDescription>Create a key for user-level thread-specific data.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_key_delete" id=link97 onMouseOver="ShowTip(event, 'tt96', 'link97')" onMouseOut="HideTip('tt96')">myth_key_delete</a></td><td class=SDescription>Delete a key for user-level thread-specific data.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_setspecific" id=link98 onMouseOver="ShowTip(event, 'tt97', 'link98')" onMouseOut="HideTip('tt97')">myth_setspecific</a></td><td class=SDescription>Associate a thread-specific data with a key.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_getspecific" id=link99 onMouseOver="ShowTip(event, 'tt98', 'link99')" onMouseOut="HideTip('tt98')">myth_getspecific</a></td><td class=SDescription>Obtain a user-level thread-specific data associated with a key.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_get_worker_num" id=link100 onMouseOver="ShowTip(event, 'tt99', 'link100')" onMouseOut="HideTip('tt99')">myth_get_worker_num</a></td><td class=SDescription>The index of the calling thread, an integer x satisfying 0 <= x < myth_get_num_workers().</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_get_num_workers" id=link101 onMouseOver="ShowTip(event, 'tt100', 'link101')" onMouseOut="HideTip('tt100')">myth_get_num_workers</a></td><td class=SDescription>The number of underlying workers.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_wls_key_create" id=link102 onMouseOver="ShowTip(event, 'tt101', 'link102')" onMouseOut="HideTip('tt101')">myth_wls_key_create</a></td><td class=SDescription>Create a key for worker-specific data.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_wls_key_delete" id=link103 onMouseOver="ShowTip(event, 'tt102', 'link103')" onMouseOut="HideTip('tt102')">myth_wls_key_delete</a></td><td class=SDescription>Delete a key for worker-specific data.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_wls_setspecific" id=link104 onMouseOver="ShowTip(event, 'tt103', 'link104')" onMouseOut="HideTip('tt103')">myth_wls_setspecific</a></td><td class=SDescription>Associate a worker-specific data with a key.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_wls_getspecific" id=link105 onMouseOver="ShowTip(event, 'tt104', 'link105')" onMouseOut="HideTip('tt104')">myth_wls_getspecific</a></td><td class=SDescription>Obtain a worker-specific data associated with a key.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_sched_yield" id=link106 onMouseOver="ShowTip(event, 'tt105', 'link106')" onMouseOut="HideTip('tt105')">myth_sched_yield</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_sleep" id=link107 onMouseOver="ShowTip(event, 'tt106', 'link107')" onMouseOut="HideTip('tt106')">myth_sleep</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#myth_usleep" id=link108 onMouseOver="ShowTip(event, 'tt107', 'link108')" onMouseOut="HideTip('tt107')">myth_usleep</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#myth_nanosleep" id=link109 onMouseOver="ShowTip(event, 'tt108', 'link109')" onMouseOut="HideTip('tt108')">myth_nanosleep</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_init"></a>myth_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_init(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initialize MassiveThreads library with default parameters (see <a href="#myth_init_ex" class=LFunction id=link110 onMouseOver="ShowTip(event, 'tt2', 'link110')" onMouseOut="HideTip('tt2')">myth_init_ex</a>). You normally do not have to call it by youself, as it is automatically called when you first call any MassiveThreads function. Internally, it invokes underlying workers. You may want to call it to make absolutely sure that an initilization has taken place before a certain point.</p><h4 class=CHeading>Returns</h4><p>zero if the library has been successfully initialized. non-zero otherwise.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_init_ex" class=LFunction id=link111 onMouseOver="ShowTip(event, 'tt2', 'link111')" onMouseOut="HideTip('tt2')">myth_init_ex</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_init_ex"></a>myth_init_ex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_init_ex(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initialize MassiveThreads library with the specified global attributes. You normally do not have to call it by youself, as <a href="#myth_init" class=LFunction id=link112 onMouseOver="ShowTip(event, 'tt1', 'link112')" onMouseOut="HideTip('tt1')">myth_init</a> is automatically called when you first call any MassiveThreads function. You may want to call it to explicitly set various attributes.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>the pointer to global attribute</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if the library has been successfully initialized. non-zero otherwise.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_init" class=LFunction id=link113 onMouseOver="ShowTip(event, 'tt1', 'link113')" onMouseOut="HideTip('tt1')">myth_init</a>, <a href="#myth_create" class=LFunction id=link114 onMouseOver="ShowTip(event, 'tt12', 'link114')" onMouseOut="HideTip('tt12')">myth_create</a>, <a href="#myth_create_ex" class=LFunction id=link115 onMouseOver="ShowTip(event, 'tt13', 'link115')" onMouseOut="HideTip('tt13')">myth_create_ex</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_fini"></a>myth_fini</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_fini(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Finalize MassiveThreads.</p><p>See Also: <a href="#myth_init" class=LFunction id=link116 onMouseOver="ShowTip(event, 'tt1', 'link116')" onMouseOut="HideTip('tt1')">myth_init</a>, <a href="#myth_init_ex" class=LFunction id=link117 onMouseOver="ShowTip(event, 'tt2', 'link117')" onMouseOut="HideTip('tt2')">myth_init_ex</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_init"></a>myth_globalattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_init(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to initialize</td></tr></table><p>initialize global attributes of MassiveThreads to default values. you can then set various attributes using one of myth_globalattr_set_ATTRIBUTE functions.</p><p>See Also: <a href="#myth_init_ex" class=LFunction id=link118 onMouseOver="ShowTip(event, 'tt2', 'link118')" onMouseOut="HideTip('tt2')">myth_init_ex</a>, <a href="#myth_globalattr_destroy" class=LFunction id=link119 onMouseOver="ShowTip(event, 'tt5', 'link119')" onMouseOut="HideTip('tt5')">myth_globalattr_destroy</a>, <a href="#myth_globalattr_get_stacksize" class=LFunction id=link120 onMouseOver="ShowTip(event, 'tt6', 'link120')" onMouseOut="HideTip('tt6')">myth_globalattr_get_stacksize</a>, <a href="#myth_globalattr_set_stacksize" class=LFunction id=link121 onMouseOver="ShowTip(event, 'tt7', 'link121')" onMouseOut="HideTip('tt7')">myth_globalattr_set_stacksize</a>, <a href="#myth_globalattr_get_n_workers" class=LFunction id=link122 onMouseOver="ShowTip(event, 'tt8', 'link122')" onMouseOut="HideTip('tt8')">myth_globalattr_get_n_workers</a>, <a href="#myth_globalattr_set_n_workers" class=LFunction id=link123 onMouseOver="ShowTip(event, 'tt9', 'link123')" onMouseOut="HideTip('tt9')">myth_globalattr_set_n_workers</a>, <a href="#myth_globalattr_get_bind_workers" class=LFunction id=link124 onMouseOver="ShowTip(event, 'tt10', 'link124')" onMouseOut="HideTip('tt10')">myth_globalattr_get_bind_workers</a>, <a href="#myth_globalattr_set_bind_workers" class=LFunction id=link125 onMouseOver="ShowTip(event, 'tt11', 'link125')" onMouseOut="HideTip('tt11')">myth_globalattr_set_bind_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_destroy"></a>myth_globalattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_destroy(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to destroy</td></tr></table><p>destroy global attributes of MassiveThreads.</p><p>See Also: <a href="#myth_init" class=LFunction id=link126 onMouseOver="ShowTip(event, 'tt1', 'link126')" onMouseOut="HideTip('tt1')">myth_init</a>, <a href="#myth_init_ex" class=LFunction id=link127 onMouseOver="ShowTip(event, 'tt2', 'link127')" onMouseOut="HideTip('tt2')">myth_init_ex</a>, <a href="#myth_globalattr_init" class=LFunction id=link128 onMouseOver="ShowTip(event, 'tt4', 'link128')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_get_stacksize"></a>myth_globalattr_get_stacksize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_stacksize(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to get stack size of</td></tr><tr><td class=CDLEntry>stacksize</td><td class=CDLDescription>address to get the result in</td></tr></table><p>get the stack size attribute in attr, set either by myth_globalattr_init or myth_globalattr_set_stacksize</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link129 onMouseOver="ShowTip(event, 'tt4', 'link129')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_set_stacksize" class=LFunction id=link130 onMouseOver="ShowTip(event, 'tt7', 'link130')" onMouseOut="HideTip('tt7')">myth_globalattr_set_stacksize</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_set_stacksize"></a>myth_globalattr_set_stacksize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_stacksize(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to set stack size of</td></tr><tr><td class=CDLEntry>stacksize</td><td class=CDLDescription>the stack size to set</td></tr></table><p>set the stack size attribute in attr to the specified stacksize.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link131 onMouseOver="ShowTip(event, 'tt4', 'link131')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_get_stacksize" class=LFunction id=link132 onMouseOver="ShowTip(event, 'tt6', 'link132')" onMouseOut="HideTip('tt6')">myth_globalattr_get_stacksize</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_get_n_workers"></a>myth_globalattr_get_n_workers</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_n_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>n_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to get the number of workers of</td></tr><tr><td class=CDLEntry>n_workers</td><td class=CDLDescription>the address to get the number of workers in</td></tr></table><p>get the number of workers attribute in attr, set either by myth_globalattr_init or myth_globalattr_set_n_workers</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link133 onMouseOver="ShowTip(event, 'tt4', 'link133')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_set_n_workers" class=LFunction id=link134 onMouseOver="ShowTip(event, 'tt9', 'link134')" onMouseOut="HideTip('tt9')">myth_globalattr_set_n_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_set_n_workers"></a>myth_globalattr_set_n_workers</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_n_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>n_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to set the number of workers of</td></tr><tr><td class=CDLEntry>n_workers</td><td class=CDLDescription>the number of workers</td></tr></table><p>set the number of workers attribute of attr</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link135 onMouseOver="ShowTip(event, 'tt4', 'link135')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_get_n_workers" class=LFunction id=link136 onMouseOver="ShowTip(event, 'tt8', 'link136')" onMouseOut="HideTip('tt8')">myth_globalattr_get_n_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_get_bind_workers"></a>myth_globalattr_get_bind_workers</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_bind_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>bind_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to get the bind_workers attribute of</td></tr><tr><td class=CDLEntry>bind_workers</td><td class=CDLDescription>the address to get the bind_workers attribute in</td></tr></table><p>get the bind_workers attribute in attr, set either by myth_globalattr_init or myth_globalattr_set_bind_workers</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link137 onMouseOver="ShowTip(event, 'tt4', 'link137')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_set_bind_workers" class=LFunction id=link138 onMouseOver="ShowTip(event, 'tt11', 'link138')" onMouseOut="HideTip('tt11')">myth_globalattr_set_bind_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_globalattr_set_bind_workers"></a>myth_globalattr_set_bind_workers</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_bind_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>bind_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>attr</td><td class=CDLDescription>global attribute to set the bind_workers attribute of</td></tr><tr><td class=CDLEntry>bind_workers</td><td class=CDLDescription>1 or 0. 1 specified each worker should be bound to a core.</td></tr></table><p>set the bind_workers attribute of attr</p><h4 class=CHeading>See Also</h4><p><a href="#myth_globalattr_init" class=LFunction id=link139 onMouseOver="ShowTip(event, 'tt4', 'link139')" onMouseOut="HideTip('tt4')">myth_globalattr_init</a>, <a href="#myth_globalattr_get_bind_workers" class=LFunction id=link140 onMouseOver="ShowTip(event, 'tt10', 'link140')" onMouseOut="HideTip('tt10')">myth_globalattr_get_bind_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_create"></a>myth_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>myth_thread_t myth_create(</td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>arg</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a new user-level thread executing func(arg) with default options. Note that it is equivalent to myth_create_ex(func,arg,0);</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>func</td><td class=CDLDescription>a pointer to a function.</td></tr><tr><td class=CDLEntry>arg</td><td class=CDLDescription>a pointer given to func.</td></tr></table><h4 class=CHeading>Returns</h4><p>The identifier of the newly created user-level thread.</p><h4 class=CHeading>Bug</h4><p>Should any error occur, it terminates the program rather than returning an error code.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_create_ex" class=LFunction id=link141 onMouseOver="ShowTip(event, 'tt13', 'link141')" onMouseOut="HideTip('tt13')">myth_create_ex</a>, <a href="#myth_join" class=LFunction id=link142 onMouseOver="ShowTip(event, 'tt15', 'link142')" onMouseOut="HideTip('tt15')">myth_join</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_create_ex"></a>myth_create_ex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>id,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>arg</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a new user-level thread executing func(arg) with specified options.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>id</td><td class=CDLDescription>a pointer, if not NULL, to which id of the created thread will be stored.</td></tr><tr><td class=CDLEntry>func</td><td class=CDLDescription>a pointer to a function.</td></tr><tr><td class=CDLEntry>arg</td><td class=CDLDescription>a pointer given to func.</td></tr><tr><td class=CDLEntry>attr</td><td class=CDLDescription>a pointer to a data structure of type <myth_thread_attr_t> specifying thread attributes, or NULL to mean the deafult.</td></tr></table><h4 class=CHeading>Returns</h4><p>0 if succeed.</p><h4 class=CHeading>Bug</h4><p>Should any error occur, it terminates the program rather than returning an error code.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_create" class=LFunction id=link143 onMouseOver="ShowTip(event, 'tt12', 'link143')" onMouseOut="HideTip('tt12')">myth_create</a>, <a href="#myth_join" class=LFunction id=link144 onMouseOver="ShowTip(event, 'tt15', 'link144')" onMouseOut="HideTip('tt15')">myth_join</a>, <myth_thread_option></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_exit"></a>myth_exit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_exit(</td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ret</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Terminate the calling user-level thread.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>ret</td><td class=CDLDescription>exit value of the thread, which can be retrieved by calling <a href="#myth_join" class=LFunction id=link145 onMouseOver="ShowTip(event, 'tt15', 'link145')" onMouseOut="HideTip('tt15')">myth_join</a> on this thread.</td></tr></table><h4 class=CHeading>See Also</h4><p><a href="#myth_join" class=LFunction id=link146 onMouseOver="ShowTip(event, 'tt15', 'link146')" onMouseOut="HideTip('tt15')">myth_join</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join"></a>myth_join</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>th,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>**</td><td class="PParameter prettyprint " nowrap>result</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Wait for the specified thread th to finish.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>th</td><td class=CDLDescription>the identifier of the thread to wait for</td></tr><tr><td class=CDLEntry>result</td><td class=CDLDescription>a pointer to a data structure receiving the exit value of the thread, as determined by <a href="#myth_exit" class=LFunction id=link147 onMouseOver="ShowTip(event, 'tt14', 'link147')" onMouseOut="HideTip('tt14')">myth_exit</a> or the return value of the thread’s main function.</td></tr></table><h4 class=CHeading>See Also</h4><p><a href="#myth_create" class=LFunction id=link148 onMouseOver="ShowTip(event, 'tt12', 'link148')" onMouseOut="HideTip('tt12')">myth_create</a>, <a href="#myth_create_ex" class=LFunction id=link149 onMouseOver="ShowTip(event, 'tt13', 'link149')" onMouseOut="HideTip('tt13')">myth_create_ex</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_create_join_many_ex"></a>myth_create_join_many_ex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_join_many_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ids,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attrs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>args,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>results,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>id_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>attr_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>arg_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>result_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>long </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>nthreads</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create many user-level threads executing the same function with various arguments and attributes and wait for them to complete.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>ids</td><td class=CDLDescription>base pointer to a (strided) array, to which thread ids of the created threads wll be stored (may be NULL)</td></tr><tr><td class=CDLEntry>attrs</td><td class=CDLDescription>base pointer to a (strided) array specifying attributes of threads to create (may be NULL)</td></tr><tr><td class=CDLEntry>func</td><td class=CDLDescription>a function to execute by each thread</td></tr><tr><td class=CDLEntry>args</td><td class=CDLDescription>base pointer to a (strided) array specifying arguments to func</td></tr><tr><td class=CDLEntry>results</td><td class=CDLDescription>base pointer to a (strided) array to which results of the function call will be stored (may be NULL)</td></tr><tr><td class=CDLEntry>id_stride</td><td class=CDLDescription>the stride of the ids array, in bytes</td></tr><tr><td class=CDLEntry>attr_stride</td><td class=CDLDescription>the stride of the attrs array, in bytes</td></tr><tr><td class=CDLEntry>arg_stride</td><td class=CDLDescription>the stride of the args array, in bytes</td></tr><tr><td class=CDLEntry>result_stride</td><td class=CDLDescription>the stride of the results array, in bytes</td></tr><tr><td class=CDLEntry>long nthreads</td><td class=CDLDescription>number of threads to execute f</td></tr></table><p>in its simplest form,</p><p>myth_create_join_many_ex(0, 0, f, X, 0, 0, 0, s, 0, n);</p><p>will execute f(args), f(args+s), f(args+2*s), ..., and f(args+(n-1)*s), each by a separate thread and discard their return values. if you want to get return values, give results and result_stride. e.g.,</p><p>myth_create_join_many_ex(0, 0, f, X, Y, 0, 0, xs, t, n);</p><h4 class=CHeading>is equivalent to</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>for all i = 0, ..., n</td><td class=CDLDescription>1 ((void **)(Y + i * t))[0] = f(args + i * s);</td></tr></table><p>note that all stride arguments must be given in bytes. this is to allow you to receive results in a field of an enclosing structure. e.g.,</p><p>struct { char stuff[100]; void * result } args[nthreads];</p><p>in this case you want to call this function with results = &args[0].result and result_stride = sizeof(args[0]);</p><p>consistent with this policy, results is a void pointer, although it is internally used as (void **).</p><p>You can similarly specify addresses of attributes and thread ids, using the base pointer and the stride.</p><h4 class=CHeading>Returns</h4><p>0 if succeed.</p><h4 class=CHeading>Bug</h4><p>Should any error occur, it terminates the program rather than returning an error code.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_create" class=LFunction id=link150 onMouseOver="ShowTip(event, 'tt12', 'link150')" onMouseOut="HideTip('tt12')">myth_create</a>, <a href="#myth_join" class=LFunction id=link151 onMouseOver="ShowTip(event, 'tt15', 'link151')" onMouseOut="HideTip('tt15')">myth_join</a>, <myth_thread_attr></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_create_join_various_ex"></a>myth_create_join_various_ex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_join_various_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ids,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attrs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>funcs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>args,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>results,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>id_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>attr_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>arg_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>result_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>long </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>nthreads</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create many user-level threads executing various functions with various arguments and attributes and wait for them to complete. This is almost the same with myth_create_join_many_ex, except that you can have threads execute different functions.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>ids</td><td class=CDLDescription>base pointer to a (strided) array, to which thread ids of the created threads wll be stored (may be NULL)</td></tr><tr><td class=CDLEntry>attrs</td><td class=CDLDescription>base pointer to a (strided) array specifying attributes of threads to create (may be NULL)</td></tr><tr><td class=CDLEntry>funcs</td><td class=CDLDescription>base pointer to a (strided) array specifying functions to execute</td></tr><tr><td class=CDLEntry>args</td><td class=CDLDescription>base pointer to a (strided) array specifying arguments to func</td></tr><tr><td class=CDLEntry>results</td><td class=CDLDescription>base pointer to a (strided) array to which results of the function call will be stored (may be NULL)</td></tr><tr><td class=CDLEntry>id_stride</td><td class=CDLDescription>the stride of the ids array, in bytes</td></tr><tr><td class=CDLEntry>attr_stride</td><td class=CDLDescription>the stride of the attrs array, in bytes</td></tr><tr><td class=CDLEntry>func_stride</td><td class=CDLDescription>the stride of the funcs array, in bytes</td></tr><tr><td class=CDLEntry>arg_stride</td><td class=CDLDescription>the stride of the args array, in bytes</td></tr><tr><td class=CDLEntry>result_stride</td><td class=CDLDescription>the stride of the results array, in bytes</td></tr><tr><td class=CDLEntry>long nthreads</td><td class=CDLDescription>number of threads to execute f</td></tr></table><p>in its simplest form,</p><p>myth_create_join_many_ex(0, 0, F, X, 0, 0, 0, fs, xs, 0, n);</p><p>will execute f_0(args), f_1(args+xs), f_2(args+2*xs), ..., where f_i = *((myth_func_t *)(F + fs * i)), each by a separate thread and discard their return values. if you want to get return values, give results and result_stride. e.g.,</p><p>myth_create_join_many_ex(0, 0, f, X, Y, 0, 0, s, t, n);</p><h4 class=CHeading>is equivalent to</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>for all i = 0, ..., n</td><td class=CDLDescription>1 ((void **)(Y + i * t))[0] = f(args + i * s);</td></tr></table><p>note that all stride arguments must be given in bytes. this is to allow you to receive results in a field of an enclosing structure. e.g.,</p><p>struct { char stuff[100]; void * result } args[nthreads];</p><p>in this case you want to call this function with results = &args[0].result and result_stride = sizeof(args[0]);</p><p>consistent with this policy, results is a void pointer, although it is internally used as (void **).</p><p>You can similarly specify addresses of attributes and thread ids, using the base pointer and the stride.</p><h4 class=CHeading>Returns</h4><p>0 if succeed.</p><h4 class=CHeading>Bug</h4><p>Should any error occur, it terminates the program rather than returning an error code.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_create" class=LFunction id=link152 onMouseOver="ShowTip(event, 'tt12', 'link152')" onMouseOut="HideTip('tt12')">myth_create</a>, <a href="#myth_join" class=LFunction id=link153 onMouseOver="ShowTip(event, 'tt15', 'link153')" onMouseOut="HideTip('tt15')">myth_join</a>, <myth_thread_attr></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_detach"></a>myth_detach</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_detach(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>th</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_is_myth_worker"></a>myth_is_myth_worker</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_is_myth_worker(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>1 if the calling OS-level thread is a massivethreads worker. useful when you mix pthreads and massivethreads.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_self"></a>myth_self</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>myth_thread_t myth_self(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>The identifier of the calling thread.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_get_worker_num" class=LFunction id=link154 onMouseOver="ShowTip(event, 'tt99', 'link154')" onMouseOut="HideTip('tt99')">myth_get_worker_num</a>, <a href="#myth_get_num_workers" class=LFunction id=link155 onMouseOver="ShowTip(event, 'tt100', 'link155')" onMouseOut="HideTip('tt100')">myth_get_num_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_equal"></a>myth_equal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_equal(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>t1,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>t2</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_init"></a>myth_thread_attr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_init(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_getdetachstate"></a>myth_thread_attr_getdetachstate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getdetachstate(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>detachstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_setdetachstate"></a>myth_thread_attr_setdetachstate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setdetachstate(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>detachstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_getguardsize"></a>myth_thread_attr_getguardsize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getguardsize(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>guardsize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_setguardsize"></a>myth_thread_attr_setguardsize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setguardsize(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>guardsize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_getstacksize"></a>myth_thread_attr_getstacksize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getstacksize(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_setstacksize"></a>myth_thread_attr_setstacksize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setstacksize(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_getstack"></a>myth_thread_attr_getstack</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getstack(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>**</td><td class="PParameter prettyprint " nowrap>stackaddr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_thread_attr_setstack"></a>myth_thread_attr_setstack</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setstack(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stackaddr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_getattr_default_np"></a>myth_getattr_default_np</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getattr_default_np(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_getattr_np"></a>myth_getattr_np</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getattr_np(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>thread,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_getconcurrency"></a>myth_getconcurrency</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getconcurrency(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_yield_ex"></a>myth_yield_ex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_yield_ex(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameter prettyprint " nowrap>yield_opt</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Yield execution to another user-level thread.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>yield_opt</td><td class=CDLDescription>take one of the following values and change the behavior.</td></tr></table><p>myth_yield_option_half_half : behave like myth_yield_option_local_first with probability 1/2 and like myth_yield_option_steal_first with probability 1/2 myth_yield_option_local_only : try to yield to another thread in the local run queue. if none exist, the caller keeps running. myth_yield_option_local_first : try to yield to another thread in the local run queue. if none exist, an attempt is made to steal another thread in a remote run queue; if it succeeds, yields to it. otherwise keep running. myth_yield_option_steal_only : an attempt is made to steal another thread in a remote run queue; if it succeeds, yield to it. otherwise keep running. myth_yield_option_steal_first : an attempt is made to steal another thread in a remote run queue; if it succeeds, yield to it. otherwise try to yield to another thread in the local run queue. if none exist, the caller keeps running.</p><h4 class=CHeading>Note</h4><p>Available options as well as detailed behaviors may change in future.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_yield" class=LFunction id=link156 onMouseOver="ShowTip(event, 'tt35', 'link156')" onMouseOut="HideTip('tt35')">myth_yield</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_yield"></a>myth_yield</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_yield(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>it is equivalent to myth_yield_ex(myth_yield_option_half_half); with probability 1/2, try to yield to a thread in the local queue and if none is found try to steal a thread from a remote queue. do the opposite with probability 1/2.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_yield" class=LFunction id=link157 onMouseOver="ShowTip(event, 'tt35', 'link157')" onMouseOut="HideTip('tt35')">myth_yield</a></p><h4 class=CHeading>Note</h4><p>The above describes the current implementation, which may change in future. You should not rely on its exact behavior (other than it switches to another user-level thread).</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_setcancelstate"></a>myth_setcancelstate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setcancelstate(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>state,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>oldstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_setcanceltype"></a>myth_setcanceltype</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setcanceltype(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>type,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>oldtype</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cancel"></a>myth_cancel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cancel(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>th</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_testcancel"></a>myth_testcancel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_testcancel(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Types"></a>Types</h3></div></div>
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="myth_once_t"></a>myth_once_t</h3></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_once"></a>myth_once</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_once(</td><td class="PType prettyprint " nowrap>myth_once_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>once_control,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*init_routine)(void)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_init"></a>myth_mutex_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initialize a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a pointer to a mutex data structure to initialize.</td></tr><tr><td class=CDLEntry>attr</td><td class=CDLDescription>a pointer to mutex attributes.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if suceeds or an errno.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_destroy" class=LFunction id=link158 onMouseOver="ShowTip(event, 'tt42', 'link158')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a>, <a href="#myth_mutex_lock" class=LFunction id=link159 onMouseOver="ShowTip(event, 'tt44', 'link159')" onMouseOut="HideTip('tt44')">myth_mutex_lock</a>, <a href="#myth_mutex_trylock" class=LFunction id=link160 onMouseOver="ShowTip(event, 'tt43', 'link160')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a>, <a href="#myth_mutex_unlock" class=LFunction id=link161 onMouseOver="ShowTip(event, 'tt46', 'link161')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_destroy"></a>myth_mutex_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_destroy(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Destroy a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a pointer to a mutex data structure to initialize.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if suceeds or an errno.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_init" class=LFunction id=link162 onMouseOver="ShowTip(event, 'tt41', 'link162')" onMouseOut="HideTip('tt41')">myth_mutex_init</a>, <a href="#myth_mutex_lock" class=LFunction id=link163 onMouseOver="ShowTip(event, 'tt44', 'link163')" onMouseOut="HideTip('tt44')">myth_mutex_lock</a>, <a href="#myth_mutex_trylock" class=LFunction id=link164 onMouseOver="ShowTip(event, 'tt43', 'link164')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a>, <a href="#myth_mutex_unlock" class=LFunction id=link165 onMouseOver="ShowTip(event, 'tt46', 'link165')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_trylock"></a>myth_mutex_trylock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_trylock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Try to lock a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a mutex to try to lock.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if it successfully acquired a lock. an errno otherwise.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_init" class=LFunction id=link166 onMouseOver="ShowTip(event, 'tt41', 'link166')" onMouseOut="HideTip('tt41')">myth_mutex_init</a>, <a href="#myth_mutex_destroy" class=LFunction id=link167 onMouseOver="ShowTip(event, 'tt42', 'link167')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a>, <a href="#myth_mutex_lock" class=LFunction id=link168 onMouseOver="ShowTip(event, 'tt44', 'link168')" onMouseOut="HideTip('tt44')">myth_mutex_lock</a>, <a href="#myth_mutex_unlock" class=LFunction id=link169 onMouseOver="ShowTip(event, 'tt46', 'link169')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_lock"></a>myth_mutex_lock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_lock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Lock a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a mutex to lock.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if suceeds or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_init" class=LFunction id=link170 onMouseOver="ShowTip(event, 'tt41', 'link170')" onMouseOut="HideTip('tt41')">myth_mutex_init</a>, <a href="#myth_mutex_destroy" class=LFunction id=link171 onMouseOver="ShowTip(event, 'tt42', 'link171')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a>, <a href="#myth_mutex_trylock" class=LFunction id=link172 onMouseOver="ShowTip(event, 'tt43', 'link172')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a>, <a href="#myth_mutex_unlock" class=LFunction id=link173 onMouseOver="ShowTip(event, 'tt46', 'link173')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_timedlock"></a>myth_mutex_timedlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_timedlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Lock a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a mutex to lock.</td></tr><tr><td class=CDLEntry>abstime</td><td class=CDLDescription>absolute time the function returns when the lock cannot be acquired</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if suceeds or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_init" class=LFunction id=link174 onMouseOver="ShowTip(event, 'tt41', 'link174')" onMouseOut="HideTip('tt41')">myth_mutex_init</a>, <a href="#myth_mutex_destroy" class=LFunction id=link175 onMouseOver="ShowTip(event, 'tt42', 'link175')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a>, <a href="#myth_mutex_trylock" class=LFunction id=link176 onMouseOver="ShowTip(event, 'tt43', 'link176')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a>, <a href="#myth_mutex_unlock" class=LFunction id=link177 onMouseOver="ShowTip(event, 'tt46', 'link177')" onMouseOut="HideTip('tt46')">myth_mutex_unlock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutex_unlock"></a>myth_mutex_unlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_unlock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Unlock a mutex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a mutex to unlock.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if suceeds or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_mutex_init" class=LFunction id=link178 onMouseOver="ShowTip(event, 'tt41', 'link178')" onMouseOut="HideTip('tt41')">myth_mutex_init</a>, <a href="#myth_mutex_destroy" class=LFunction id=link179 onMouseOver="ShowTip(event, 'tt42', 'link179')" onMouseOut="HideTip('tt42')">myth_mutex_destroy</a>, <a href="#myth_mutex_lock" class=LFunction id=link180 onMouseOver="ShowTip(event, 'tt44', 'link180')" onMouseOut="HideTip('tt44')">myth_mutex_lock</a>, <a href="#myth_mutex_trylock" class=LFunction id=link181 onMouseOver="ShowTip(event, 'tt43', 'link181')" onMouseOut="HideTip('tt43')">myth_mutex_trylock</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutexattr_init"></a>myth_mutexattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_init(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutexattr_destroy"></a>myth_mutexattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_destroy(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutexattr_gettype"></a>myth_mutexattr_gettype</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_gettype(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>type</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_mutexattr_settype"></a>myth_mutexattr_settype</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_settype(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>type</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_init"></a>myth_rwlock_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_destroy"></a>myth_rwlock_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_destroy(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_rdlock"></a>myth_rwlock_rdlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_rdlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_tryrdlock"></a>myth_rwlock_tryrdlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_tryrdlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_timedrdlock"></a>myth_rwlock_timedrdlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_timedrdlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_wrlock"></a>myth_rwlock_wrlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_wrlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_trywrlock"></a>myth_rwlock_trywrlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_trywrlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_timedwrlock"></a>myth_rwlock_timedwrlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_timedwrlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlock_unlock"></a>myth_rwlock_unlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_unlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlockattr_init"></a>myth_rwlockattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_init(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlockattr_destroy"></a>myth_rwlockattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_destroy(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlockattr_getkind"></a>myth_rwlockattr_getkind</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_getkind(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>pref</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_rwlockattr_setkind"></a>myth_rwlockattr_setkind</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_setkind(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>pref</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_init"></a>myth_cond_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initialize a condition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cond</td><td class=CDLDescription>a pointer to a condition variable to initialize</td></tr><tr><td class=CDLEntry>attr</td><td class=CDLDescription>a pointer to condition variable attributes, or NULL</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_cond_destroy" class=LFunction id=link182 onMouseOver="ShowTip(event, 'tt65', 'link182')" onMouseOut="HideTip('tt65')">myth_cond_destroy</a>, <a href="#myth_cond_wait" class=LFunction id=link183 onMouseOver="ShowTip(event, 'tt68', 'link183')" onMouseOut="HideTip('tt68')">myth_cond_wait</a>, <a href="#myth_cond_signal" class=LFunction id=link184 onMouseOver="ShowTip(event, 'tt66', 'link184')" onMouseOut="HideTip('tt66')">myth_cond_signal</a>, <a href="#myth_cond_broadcast" class=LFunction id=link185 onMouseOver="ShowTip(event, 'tt67', 'link185')" onMouseOut="HideTip('tt67')">myth_cond_broadcast</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_destroy"></a>myth_cond_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_destroy(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Destroy a condition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cond</td><td class=CDLDescription>a pointer to a condition variable to destroy.</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_cond_init" class=LFunction id=link186 onMouseOver="ShowTip(event, 'tt64', 'link186')" onMouseOut="HideTip('tt64')">myth_cond_init</a>, <a href="#myth_cond_wait" class=LFunction id=link187 onMouseOver="ShowTip(event, 'tt68', 'link187')" onMouseOut="HideTip('tt68')">myth_cond_wait</a>, <a href="#myth_cond_signal" class=LFunction id=link188 onMouseOver="ShowTip(event, 'tt66', 'link188')" onMouseOut="HideTip('tt66')">myth_cond_signal</a>, <a href="#myth_cond_broadcast" class=LFunction id=link189 onMouseOver="ShowTip(event, 'tt67', 'link189')" onMouseOut="HideTip('tt67')">myth_cond_broadcast</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_signal"></a>myth_cond_signal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_signal(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>c</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Wake up at least one thread blocking on a condition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cond</td><td class=CDLDescription>a pointer to a condition variable to signal.</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_cond_init" class=LFunction id=link190 onMouseOver="ShowTip(event, 'tt64', 'link190')" onMouseOut="HideTip('tt64')">myth_cond_init</a>, <a href="#myth_cond_destroy" class=LFunction id=link191 onMouseOver="ShowTip(event, 'tt65', 'link191')" onMouseOut="HideTip('tt65')">myth_cond_destroy</a>, <a href="#myth_cond_wait" class=LFunction id=link192 onMouseOver="ShowTip(event, 'tt68', 'link192')" onMouseOut="HideTip('tt68')">myth_cond_wait</a>, <a href="#myth_cond_broadcast" class=LFunction id=link193 onMouseOver="ShowTip(event, 'tt67', 'link193')" onMouseOut="HideTip('tt67')">myth_cond_broadcast</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_broadcast"></a>myth_cond_broadcast</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_broadcast(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Wake up all threads blocking on a condition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cond</td><td class=CDLDescription>a pointer to a condition variable from which threads are to wake up.</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_cond_init" class=LFunction id=link194 onMouseOver="ShowTip(event, 'tt64', 'link194')" onMouseOut="HideTip('tt64')">myth_cond_init</a>, <a href="#myth_cond_destroy" class=LFunction id=link195 onMouseOver="ShowTip(event, 'tt65', 'link195')" onMouseOut="HideTip('tt65')">myth_cond_destroy</a>, <a href="#myth_cond_wait" class=LFunction id=link196 onMouseOver="ShowTip(event, 'tt68', 'link196')" onMouseOut="HideTip('tt68')">myth_cond_wait</a>, <a href="#myth_cond_signal" class=LFunction id=link197 onMouseOver="ShowTip(event, 'tt66', 'link197')" onMouseOut="HideTip('tt66')">myth_cond_signal</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_wait"></a>myth_cond_wait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_wait(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Atomically unlock a mutex and block on a condition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cond</td><td class=CDLDescription>a pointer to a condition variable to block on.</td></tr><tr><td class=CDLEntry>mutex</td><td class=CDLDescription>a pointer to a mutex to unlock</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_cond_init" class=LFunction id=link198 onMouseOver="ShowTip(event, 'tt64', 'link198')" onMouseOut="HideTip('tt64')">myth_cond_init</a>, <a href="#myth_cond_destroy" class=LFunction id=link199 onMouseOver="ShowTip(event, 'tt65', 'link199')" onMouseOut="HideTip('tt65')">myth_cond_destroy</a>, <a href="#myth_cond_signal" class=LFunction id=link200 onMouseOver="ShowTip(event, 'tt66', 'link200')" onMouseOut="HideTip('tt66')">myth_cond_signal</a>, <a href="#myth_cond_broadcast" class=LFunction id=link201 onMouseOver="ShowTip(event, 'tt67', 'link201')" onMouseOut="HideTip('tt67')">myth_cond_broadcast</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_cond_timedwait"></a>myth_cond_timedwait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_timedwait(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_condattr_init"></a>myth_condattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_condattr_init(</td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_condattr_destroy"></a>myth_condattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_condattr_destroy(</td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_barrier_init"></a>myth_barrier_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>unsigned </td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>count</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initialize a barrier.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>barrier</td><td class=CDLDescription>a pointer to a barrier data structure to initialize.</td></tr><tr><td class=CDLEntry>attr</td><td class=CDLDescription>a pointer to barrier attributes</td></tr><tr><td class=CDLEntry>count</td><td class=CDLDescription>the number of threads going to synchronize with this barrier</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeeded. An errno if failed.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_barrier_destroy"></a>myth_barrier_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_destroy(</td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Destroy a barrier.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>barrier</td><td class=CDLDescription>a pointer to a barrier data structure to destroy.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_barrier_wait"></a>myth_barrier_wait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_wait(</td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Wait on a barrier.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>barrier</td><td class=CDLDescription>a pointer to a barrier data structure on which the calling thread synchronizes</td></tr></table><h4 class=CHeading>Returns</h4><p>When a barrier succeeds, MYTH_BARRIER_SERIAL_THREAD is returned to a single thread whereas zeros to other threads. When a barrier fails, an errno.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_barrierattr_init"></a>myth_barrierattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrierattr_init(</td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_barrierattr_destroy"></a>myth_barrierattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrierattr_destroy(</td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join_counter_init"></a>myth_join_counter_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>val</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join_counter_wait"></a>myth_join_counter_wait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_wait(</td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join_counter_dec"></a>myth_join_counter_dec</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_dec(</td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join_counterattr_init"></a>myth_join_counterattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counterattr_init(</td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_join_counterattr_destroy"></a>myth_join_counterattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counterattr_destroy(</td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_init"></a>myth_felock_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_destroy"></a>myth_felock_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_destroy(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_lock"></a>myth_felock_lock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_lock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_unlock"></a>myth_felock_unlock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_unlock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_wait_and_lock"></a>myth_felock_wait_and_lock</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_wait_and_lock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>status_to_wait</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_mark_and_signal"></a>myth_felock_mark_and_signal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_mark_and_signal(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>status_to_signal</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felock_status"></a>myth_felock_status</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_status(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felockattr_init"></a>myth_felockattr_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felockattr_init(</td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_felockattr_destroy"></a>myth_felockattr_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felockattr_destroy(</td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_uncond_init"></a>myth_uncond_init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_init(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>initialize an uncondition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uncond</td><td class=CDLDescription>a pointer to an unconditional variable data structure to initialize</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if it succeeds and non-zero otherwise</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_uncond_destroy"></a>myth_uncond_destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_destroy(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>u</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>destroy an uncondition variable.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uncond</td><td class=CDLDescription>a pointer to an unconditional variable data structure to destroy</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if it succeeds and non-zero otherwise</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_uncond_wait"></a>myth_uncond_wait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_wait(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>block on an uncondition variable, to be waken up later by myth_uncond_signal. there can be only one thread blocking on a single myth_uncond_t variable at the same time.</p><p>this function is typically called after the caller checked a data structure and learned that it cannot proceed (e.g., a caller thread trying to get an element from a queue learned the queue is empty). unlike cond_wait, however, it does not take an extra mutex variable that is assumed to be held by the caller. thus, it is the user’s responsibility to implement a means to resolve the race condition between the caller (P) and another thread (Q) that might be changing the data structure concurrently. unless correctly done, it might cause a deadlock bug; if Q changes the data structure a moment after P learned it cannot proceed but before P enters myth_uncond_wait, Q might miss the opportunity to wake up P. myth_uncond_signal waits until a thread blocks on myth_uncond_t and wakes it up.</p><p>In summary, a typical (correct) sequence to use myth_uncond_wait and myth_uncond_signal is as follows.</p><h4 class=CHeading>P</h4><p>1: atomically_change_data_to_indicate_I_am_sleeping;</p><p>2: myth_uncond_wait(u);</p><h4 class=CHeading>Q</h4><p>3: atomically_change_data_to_indicate_none_is_sleeping;</p><p>4: myth_uncond_signal(u);</p><p>line 1 and 3 must be done atomically with respect to each other. when 1 succeds, a subsequent execution of line 3 by Q must witness P should be blocking. when Q enters line 4, P might not have executed line 2. myth_uncond_signal guarantees it waits for P to enter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uncond</td><td class=CDLDescription>a pointer to an unconditional variable data structure on which the calling thread blocks.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if it succeeds and non-zero otherwise</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_uncond_signal"></a>myth_uncond_signal</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_signal(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>unblock the thread blocking on uncond. even if no threads are found on uncond at the moment of the call to this function, the caller <u>waits</u> for a thread to block on it, and then wakes it up. in other words, this function <u>always</u> wakes up a thread.</p><p>this function is typically called after the caller checked a data structure and learned that a thread should be blocked waiting for a condition to be met. unlike cond_signal, this function does not assume there is a common mutex protecting the data structure. therefore it is the user’s responsibility to implement a means for the caller to be able to “learn that a thread should be blocked.”</p><p>see the description of myth_uncond_wait for details.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uncond</td><td class=CDLDescription>a pointer to an unconditional variable data structure on which a thread is blocked.</td></tr></table><h4 class=CHeading>Returns</h4><p>zero if it succeeds and non-zero otherwise</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_key_create"></a>myth_key_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_key_create(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*destr_function)(void *)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a key for user-level thread-specific data.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a pointer to which the created key will be stored.</td></tr><tr><td class=CDLEntry>destr_function</td><td class=CDLDescription>a pointer to a destructor function.</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>Bug</h4><p>destr_function is ignored in the current implementation.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_key_delete" class=LFunction id=link202 onMouseOver="ShowTip(event, 'tt96', 'link202')" onMouseOut="HideTip('tt96')">myth_key_delete</a>, <a href="#myth_setspecific" class=LFunction id=link203 onMouseOver="ShowTip(event, 'tt97', 'link203')" onMouseOut="HideTip('tt97')">myth_setspecific</a>, <a href="#myth_getspecific" class=LFunction id=link204 onMouseOver="ShowTip(event, 'tt98', 'link204')" onMouseOut="HideTip('tt98')">myth_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_key_delete"></a>myth_key_delete</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_key_delete(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Delete a key for user-level thread-specific data.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>key to delete</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_key_create" class=LFunction id=link205 onMouseOver="ShowTip(event, 'tt95', 'link205')" onMouseOut="HideTip('tt95')">myth_key_create</a>, <a href="#myth_setspecific" class=LFunction id=link206 onMouseOver="ShowTip(event, 'tt97', 'link206')" onMouseOut="HideTip('tt97')">myth_setspecific</a>, <a href="#myth_getspecific" class=LFunction id=link207 onMouseOver="ShowTip(event, 'tt98', 'link207')" onMouseOut="HideTip('tt98')">myth_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_setspecific"></a>myth_setspecific</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setspecific(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>data</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Associate a thread-specific data with a key.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a key created by myth_key_create</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>a data to be associated with key</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_key_create" class=LFunction id=link208 onMouseOver="ShowTip(event, 'tt95', 'link208')" onMouseOut="HideTip('tt95')">myth_key_create</a>, <a href="#myth_key_delete" class=LFunction id=link209 onMouseOver="ShowTip(event, 'tt96', 'link209')" onMouseOut="HideTip('tt96')">myth_key_delete</a>, <a href="#myth_getspecific" class=LFunction id=link210 onMouseOver="ShowTip(event, 'tt98', 'link210')" onMouseOut="HideTip('tt98')">myth_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_getspecific"></a>myth_getspecific</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void *myth_getspecific(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Obtain a user-level thread-specific data associated with a key.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a key to retrieve data.</td></tr></table><h4 class=CHeading>Returns</h4><p>a data previously associated with key via myth_setspecific, or NULL if no data has been associated with it.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_key_create" class=LFunction id=link211 onMouseOver="ShowTip(event, 'tt95', 'link211')" onMouseOut="HideTip('tt95')">myth_key_create</a>, <a href="#myth_key_delete" class=LFunction id=link212 onMouseOver="ShowTip(event, 'tt96', 'link212')" onMouseOut="HideTip('tt96')">myth_key_delete</a>, <a href="#myth_setspecific" class=LFunction id=link213 onMouseOver="ShowTip(event, 'tt97', 'link213')" onMouseOut="HideTip('tt97')">myth_setspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_get_worker_num"></a>myth_get_worker_num</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_get_worker_num(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>The index of the calling thread, an integer x satisfying 0 <= x < myth_get_num_workers().</p><h4 class=CHeading>See Also</h4><p><a href="#myth_get_num_workers" class=LFunction id=link214 onMouseOver="ShowTip(event, 'tt100', 'link214')" onMouseOut="HideTip('tt100')">myth_get_num_workers</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_get_num_workers"></a>myth_get_num_workers</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_get_num_workers(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>The number of underlying workers.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_get_worker_num" class=LFunction id=link215 onMouseOver="ShowTip(event, 'tt99', 'link215')" onMouseOut="HideTip('tt99')">myth_get_worker_num</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_wls_key_create"></a>myth_wls_key_create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_key_create(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*destr_function)(void *)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Create a key for worker-specific data.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a pointer to which the created key will be stored.</td></tr><tr><td class=CDLEntry>destr_function</td><td class=CDLDescription>a pointer to a destructor function.</td></tr></table><p>wls_key is used to create data specific to each underlying worker. you can think of it as a simple wrapper to pthread_key_create.</p><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>Bug</h4><p>destr_function is ignored in the current implementation.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_wls_key_delete" class=LFunction id=link216 onMouseOver="ShowTip(event, 'tt102', 'link216')" onMouseOut="HideTip('tt102')">myth_wls_key_delete</a>, <a href="#myth_wls_setspecific" class=LFunction id=link217 onMouseOver="ShowTip(event, 'tt103', 'link217')" onMouseOut="HideTip('tt103')">myth_wls_setspecific</a>, <a href="#myth_wls_getspecific" class=LFunction id=link218 onMouseOver="ShowTip(event, 'tt104', 'link218')" onMouseOut="HideTip('tt104')">myth_wls_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_wls_key_delete"></a>myth_wls_key_delete</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_key_delete(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Delete a key for worker-specific data.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>key to delete</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_wls_key_create" class=LFunction id=link219 onMouseOver="ShowTip(event, 'tt101', 'link219')" onMouseOut="HideTip('tt101')">myth_wls_key_create</a>, <a href="#myth_wls_setspecific" class=LFunction id=link220 onMouseOver="ShowTip(event, 'tt103', 'link220')" onMouseOut="HideTip('tt103')">myth_wls_setspecific</a>, <a href="#myth_wls_getspecific" class=LFunction id=link221 onMouseOver="ShowTip(event, 'tt104', 'link221')" onMouseOut="HideTip('tt104')">myth_wls_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_wls_setspecific"></a>myth_wls_setspecific</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_setspecific(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>data</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Associate a worker-specific data with a key.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a key created by myth_key_create</td></tr><tr><td class=CDLEntry>data</td><td class=CDLDescription>a data to be associated with key</td></tr></table><h4 class=CHeading>Returns</h4><p>Zero if succeed, or an errno when an error occurred.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_wls_key_create" class=LFunction id=link222 onMouseOver="ShowTip(event, 'tt101', 'link222')" onMouseOut="HideTip('tt101')">myth_wls_key_create</a>, <a href="#myth_wls_key_delete" class=LFunction id=link223 onMouseOver="ShowTip(event, 'tt102', 'link223')" onMouseOut="HideTip('tt102')">myth_wls_key_delete</a>, <a href="#myth_wls_getspecific" class=LFunction id=link224 onMouseOver="ShowTip(event, 'tt104', 'link224')" onMouseOut="HideTip('tt104')">myth_wls_getspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_wls_getspecific"></a>myth_wls_getspecific</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void *myth_wls_getspecific(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Obtain a worker-specific data associated with a key.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>a key to retrieve data.</td></tr></table><h4 class=CHeading>Returns</h4><p>a data previously associated with key via myth_wls_setspecific, or NULL if no data has been associated with it.</p><h4 class=CHeading>See Also</h4><p><a href="#myth_wls_key_create" class=LFunction id=link225 onMouseOver="ShowTip(event, 'tt101', 'link225')" onMouseOut="HideTip('tt101')">myth_wls_key_create</a>, <a href="#myth_wls_key_delete" class=LFunction id=link226 onMouseOver="ShowTip(event, 'tt102', 'link226')" onMouseOut="HideTip('tt102')">myth_wls_key_delete</a>, <a href="#myth_wls_setspecific" class=LFunction id=link227 onMouseOver="ShowTip(event, 'tt103', 'link227')" onMouseOut="HideTip('tt103')">myth_wls_setspecific</a></p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_sched_yield"></a>myth_sched_yield</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_sched_yield(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_sleep"></a>myth_sleep</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>unsigned int myth_sleep(</td><td class="PTypePrefix prettyprint " nowrap>unsigned </td><td class="PType prettyprint " nowrap>int </td><td class="PParameter prettyprint " nowrap>s</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_usleep"></a>myth_usleep</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_usleep(</td><td class="PType prettyprint " nowrap>useconds_t </td><td class="PParameter prettyprint " nowrap>usec</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="myth_nanosleep"></a>myth_nanosleep</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_nanosleep(</td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>req,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rem</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>
</div><!--Content-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<div id=Menu><div class=MEntry><div class=MFile id=MSelected>myth.h</div></div><div class=MEntry><div class=MFile><a href="myth_spinlock-h.html">myth_spinlock.h</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Types.html">Types</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Types">Types</option></select></div></div><!--Menu-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_init(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Initialize MassiveThreads library with default parameters (see myth_init_ex). </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_init_ex(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Initialize MassiveThreads library with the specified global attributes. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_fini(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Finalize MassiveThreads.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_init(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_destroy(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_stacksize(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_stacksize(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_n_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>n_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_n_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>n_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_get_bind_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>bind_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_globalattr_set_bind_workers(</td><td class="PType prettyprint " nowrap>myth_globalattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>bind_workers</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>myth_thread_t myth_create(</td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>arg</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a new user-level thread executing func(arg) with default options. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>id,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>arg</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a new user-level thread executing func(arg) with specified options.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_exit(</td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ret</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Terminate the calling user-level thread.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>th,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>**</td><td class="PParameter prettyprint " nowrap>result</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Wait for the specified thread th to finish.</div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_join_many_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ids,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attrs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>args,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>results,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>id_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>attr_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>arg_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>result_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>long </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>nthreads</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create many user-level threads executing the same function with various arguments and attributes and wait for them to complete.</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_create_join_various_ex(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>ids,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attrs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_func_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>funcs,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>args,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>results,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>id_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>attr_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>func_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>arg_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>result_stride,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>long </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>nthreads</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create many user-level threads executing various functions with various arguments and attributes and wait for them to complete. </div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_detach(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>th</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_is_myth_worker(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>1 if the calling OS-level thread is a massivethreads worker. </div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>myth_thread_t myth_self(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>The identifier of the calling thread.</div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_equal(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>t1,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>t2</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_init(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getdetachstate(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>detachstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setdetachstate(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>detachstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getguardsize(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>guardsize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setguardsize(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>guardsize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getstacksize(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setstacksize(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_getstack(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>**</td><td class="PParameter prettyprint " nowrap>stackaddr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_thread_attr_setstack(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>stackaddr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>size_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stacksize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt31"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getattr_default_np(</td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt32"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getattr_np(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>thread,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_thread_attr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt33"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_getconcurrency(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt34"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_yield_ex(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameter prettyprint " nowrap>yield_opt</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Yield execution to another user-level thread.</div></div><div class=CToolTip id="tt35"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_yield(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>it is equivalent to myth_yield_ex(myth_yield_option_half_half); with probability 1/2, try to yield to a thread in the local queue and if none is found try to steal a thread from a remote queue. </div></div><div class=CToolTip id="tt36"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setcancelstate(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>state,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>oldstate</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt37"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setcanceltype(</td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>type,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>oldtype</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt38"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cancel(</td><td class="PType prettyprint " nowrap>myth_thread_t </td><td class="PParameter prettyprint " nowrap>th</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt39"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void myth_testcancel(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt40"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_once(</td><td class="PType prettyprint " nowrap>myth_once_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>once_control,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*init_routine)(void)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt41"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Initialize a mutex.</div></div><div class=CToolTip id="tt42"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_destroy(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Destroy a mutex.</div></div><div class=CToolTip id="tt43"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_trylock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Try to lock a mutex.</div></div><div class=CToolTip id="tt44"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_lock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Lock a mutex.</div></div><div class=CToolTip id="tt45"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_timedlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Lock a mutex.</div></div><div class=CToolTip id="tt46"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutex_unlock(</td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mtx</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Unlock a mutex.</div></div><div class=CToolTip id="tt47"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_init(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt48"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_destroy(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt49"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_gettype(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>type</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt50"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_mutexattr_settype(</td><td class="PType prettyprint " nowrap>myth_mutexattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>type</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt51"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt52"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_destroy(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt53"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_rdlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt54"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_tryrdlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt55"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_timedrdlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt56"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_wrlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt57"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_trywrlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt58"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_timedwrlock(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt59"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlock_unlock(</td><td class="PType prettyprint " nowrap>myth_rwlock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rwlock</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt60"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_init(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt61"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_destroy(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt62"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_getkind(</td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>pref</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt63"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_rwlockattr_setkind(</td><td class="PType prettyprint " nowrap>myth_rwlockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>pref</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt64"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Initialize a condition variable.</div></div><div class=CToolTip id="tt65"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_destroy(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Destroy a condition variable.</div></div><div class=CToolTip id="tt66"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_signal(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>c</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Wake up at least one thread blocking on a condition variable.</div></div><div class=CToolTip id="tt67"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_broadcast(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Wake up all threads blocking on a condition variable.</div></div><div class=CToolTip id="tt68"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_wait(</td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Atomically unlock a mutex and block on a condition variable.</div></div><div class=CToolTip id="tt69"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_cond_timedwait(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_cond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>cond,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_mutex_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>mutex,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>abstime</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt70"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_condattr_init(</td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt71"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_condattr_destroy(</td><td class="PType prettyprint " nowrap>myth_condattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt72"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>unsigned </td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>count</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Initialize a barrier.</div></div><div class=CToolTip id="tt73"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_destroy(</td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Destroy a barrier.</div></div><div class=CToolTip id="tt74"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrier_wait(</td><td class="PType prettyprint " nowrap>myth_barrier_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>barrier</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Wait on a barrier.</div></div><div class=CToolTip id="tt75"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrierattr_init(</td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt76"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_barrierattr_destroy(</td><td class="PType prettyprint " nowrap>myth_barrierattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt77"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>val</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt78"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_wait(</td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt79"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counter_dec(</td><td class="PType prettyprint " nowrap>myth_join_counter_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>jc</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt80"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counterattr_init(</td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt81"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_join_counterattr_destroy(</td><td class="PType prettyprint " nowrap>myth_join_counterattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt82"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_init(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt83"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_destroy(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt84"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_lock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt85"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_unlock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt86"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_wait_and_lock(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>status_to_wait</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt87"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_mark_and_signal(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>int </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>status_to_signal</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt88"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felock_status(</td><td class="PType prettyprint " nowrap>myth_felock_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>fe</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt89"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felockattr_init(</td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt90"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_felockattr_destroy(</td><td class="PType prettyprint " nowrap>myth_felockattr_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>attr</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt91"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_init(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>initialize an uncondition variable.</div></div><div class=CToolTip id="tt92"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_destroy(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>u</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>destroy an uncondition variable.</div></div><div class=CToolTip id="tt93"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_wait(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>block on an uncondition variable, to be waken up later by myth_uncond_signal. </div></div><div class=CToolTip id="tt94"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_uncond_signal(</td><td class="PType prettyprint " nowrap>myth_uncond_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>uncond</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>unblock the thread blocking on uncond. </div></div><div class=CToolTip id="tt95"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_key_create(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*destr_function)(void *)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a key for user-level thread-specific data.</div></div><div class=CToolTip id="tt96"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_key_delete(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Delete a key for user-level thread-specific data.</div></div><div class=CToolTip id="tt97"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_setspecific(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>data</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Associate a thread-specific data with a key.</div></div><div class=CToolTip id="tt98"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void *myth_getspecific(</td><td class="PType prettyprint " nowrap>myth_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Obtain a user-level thread-specific data associated with a key.</div></div><div class=CToolTip id="tt99"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_get_worker_num(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>The index of the calling thread, an integer x satisfying 0 <= x < myth_get_num_workers().</div></div><div class=CToolTip id="tt100"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_get_num_workers(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>The number of underlying workers.</div></div><div class=CToolTip id="tt101"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_key_create(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>(*destr_function)(void *)</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a key for worker-specific data.</div></div><div class=CToolTip id="tt102"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_key_delete(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Delete a key for worker-specific data.</div></div><div class=CToolTip id="tt103"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_wls_setspecific(</td><td class="PTypePrefix prettyprint " nowrap></td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>key,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>const </td><td class="PType prettyprint " nowrap>void </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>data</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Associate a worker-specific data with a key.</div></div><div class=CToolTip id="tt104"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>void *myth_wls_getspecific(</td><td class="PType prettyprint " nowrap>myth_wls_key_t </td><td class="PParameter prettyprint " nowrap>key</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Obtain a worker-specific data associated with a key.</div></div><div class=CToolTip id="tt105"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_sched_yield(</td><td class="PParameter prettyprint " nowrap>void</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt106"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>unsigned int myth_sleep(</td><td class="PTypePrefix prettyprint " nowrap>unsigned </td><td class="PType prettyprint " nowrap>int </td><td class="PParameter prettyprint " nowrap>s</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt107"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_usleep(</td><td class="PType prettyprint " nowrap>useconds_t </td><td class="PParameter prettyprint " nowrap>usec</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt108"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>int myth_nanosleep(</td><td class="PTypePrefix prettyprint " nowrap>const struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>req,</td></tr><tr><td></td><td class="PTypePrefix prettyprint " nowrap>struct </td><td class="PType prettyprint " nowrap>timespec </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>rem</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><!--END_ND_TOOLTIPS-->
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|