linux/Documentation/atomic_ops.txt
<<
tionv2./spa > v2./form > v2.a tionv2 href="../linux+v3="v6/Documenta" /atomic_ops.txt">tionv2.img src="../.sta" c/gfx/right.png" alt=">>">ti./spa >ti.spa class="lxr_search">tiontionv2.input typtiohidden" namtionavtarget" tionv2.input typtiotext" namtiosearch" idiosearch">tionv2.butt.13typtiosubmit">Search v2./form > ./spa >ti.spa class="lxr_prefs" > v2.a href="+prefs?return=Documenta" /atomic_ops.txt"tionv2 onclick="return ajax_prefs();">tionv2Prefs> v2./a>ti./spa >onv2 2./div >onv2 2.form ac" ="ajax+*" method="post" onsubmit="return false;">ti.input typtiohidden" namtioajax_lookup" idioajax_lookup" tonv2 2./form >tonv2 2.div class="headingbott.m">
onv2
onv2 v2 2.div idiosearch_results" class="search_results"> v >onv2 2./div > .div idiocontent" > .div idiofile_contents"
2 21./a>                Seman"
cs and Behavior of Atomic and
2 22./a>                         Bitmask Opera"
	 s
2 23./a>t2 24./a>                          David S. Miller        t2 25./a>t2 26./a>        This document is intended to serve as a guide to Linux portt2 27./a>maintainers on how to implement atomic counter, bitops, and spinlockt2 28./a>interfaces properly.t2 29./a>t2  vala>        The atomic_t typt should be defined as a signed integer.t2 11./a>Also, it should be made opaqut such that any kind of cast to a normalt2 12./a>C integer typt will fail.  Something like the following shouldt2 13./a>suffice:t2 14./a>t2 15ala>        typtdef struct { int counter; } atomic_t;t2 16./a>t2 17./a>Historically, counter has been declared vola"
le.  This is now discouraged.t2 18./a>See Documenta"
	 /vola"
le-considered-harmful.txt for the complete ra"
	 ale.t2 19./a>t2 2vala>local_t is very similar to atomic_t. If the counter is per CPU and onlyt2 21./a>updated by one CPU, local_t is probably more appropriate. Pleast seet2 22./a>Documenta"
	 /local_ops.txt for the seman"
cs of local_t.t2 23./a>t2 24./a>The first opera"
	 s to implement for atomic_t's are the initializers and
2 25ala>plain reads.t2 26./a>t2 27ala>        #define ATOMIC_INIT(i)          { (i) }t2 28ala>        #define atomic_set(v, i)        ((v)->counter = (i))t2 29./a>t2 30./a>The first macro is used in defini"
	 s, such as:t2 31./a>t2 32./a>sta"
c atomic_t my_counter = ATOMIC_INIT(1);t2 33./a>t2 34./a>The initializer is atomic in that the return 2 35ala>are guaran"eed to be correct reflecting the initialized 2 36./a>initializer is used before runtime.  If the initializer is used at runtime, at2 37ala>proper implicit or explicit read memory barrier is needed before reading thet2 38ala>2 39./a>t2 40./a>The second interface can be used at runtime, as in:t2 41./a>t2 42./a>        struct foo { atomic_t counter; };t2 43./a>        ...t2 44./a>t2 45./a>        struct foo *k;t2 46./a>t2 47ala>        k = kmalloc(sizeof(*k), GFP_KERNEL);t2 48ala>        if (!k)t2 49./a>                return -ENOMEM;t2 5vala>        atomic_set(&k->counter, 0);t2 51./a>t2 52./a>The setting is atomic in that the return 2 53./a>all threads are guaran"eed to be correct reflecting either the 2 54./a>been set with this opera"
	  or set with another opera"
	 .  A proper implicitt2 55./a>or explicit memory barrier is needed before the 2 56./a>is guaran"eed to be readablt with atomic_read from another thread.t2 57./a>t2 58ala>Next, we have:t2 59./a>t2 60ala>        #define atomic_read(v)  ((v)->counter)t2 61./a>t2 62./a>which simply reads the counter 2 63./a>The read is atomic in that the return 2 64ala>2 65./a>implicit or explicit memory barrier is used after possiblt runtimet2 66./a>initializa"
	  by any other thread and the 2 67./a>interface opera"
	 s.  atomic_read does not guaran"ee that the runtimet2 68./a>initializa"
	  by any other thread is visiblt yet, so the user of thet2 69./a>interface must take care of that with a proper implicit or explicit memoryt2 70ala>barrier.t2 71./a>t2 72./a>*** WARNING: atomic_read() and atomic_set() DO NOT IMPLY BARRIERS! ***t2 73./a>t2 74ala>Some architectures may choost to use the 2 75ala>assembly to guaran"ee some degree of immediacy for atomic_read() andt2 76./a>atomic_set().  This is not uniformly guaran"eed, and may change in the future,t2 77./a>so all users of atomic_t should treat atomic_read() and atomic_set() as simplet2 78./a>C sta"ements that may be reordered or 13"
mized away entirely by the comp
lert2 79./a>or processor, and explicitly invoke the appropriate comp
ler and/or memoryt2 80ala>barrier for each use case.  Failurt to do so will result in code that mayt2 81./a>suddenly break when used with different architectures or comp
lert2 82./a>13"
miza"
	 s, or even changes in unrelated code which changes how thet2 83./a>comp
ler 13"
mizes the sec"
	  accessing atomic_t variablts.t2 84./a>t2 85./a>*** YOU HAVE BEEN WARNED! ***t2 86./a>t2 87./a>Properly aligned pointers, longs, ints, and chars (and unsignedt2 88./a>equi2 89./a>sinse as les9ribed for atomic_read() and atomic_set().  The ACCESS_ONCE()t2 90./a>macro should be used to prevent the comp
ler from using 13"
miza"
	 st2 91./a>that might otherwise 13"
mize accesses out of existence on the one hand,t2 92./a>or that might create unsolicited accesses on the other.t2 93./a>t2 94./a>For example consider the following code:t2 95./a>t2 96./a>        while (a > 0)t2 97ala>                do_something();t2 98./a>t2 99./a>If the comp
ler can prove that do_something() does not store to thet2100ala>2101./a>the following:t2102./a>t2103./a>        tmp = a;t2104./a>        if (a > 0)t2105ala>                for (;;)t2106ala>                        do_something();t2107./a>t2108./a>If you don't want the comp
ler to do this (and you probably don't), thent2109./a>you should use something like the following:t21 vala>t2111./a>        while (ACCESS_ONCE(a) < 0)t2112./a>                do_something();t2113./a>t2114./a>Alterna"
vely, you could place a barrier() call in the loop.t2115./a>t2116./a>For another example, consider the following code:t2117./a>t2118./a>        tmp_a = a;t2119./a>        do_something_with(tmp_a);t2120./a>        do_something_else_with(tmp_a);t2121./a>t2122./a>If the comp
ler can prove that do_something_with() does not store to thet2123./a>2124./a>addi"
	 al load as follows:t2125./a>t2126./a>        tmp_a = a;t2127ala>        do_something_with(tmp_a);t2128./a>        tmp_a = a;t2129./a>        do_something_else_with(tmp_a);t213vala>t2131./a>This could fatally confuse your code if it expected the same 2132./a>to be passed to do_something_with() and do_something_else_with().t2133./a>t2134./a>The comp
ler would be likely to manufacture this addi"
	 al load ift2135ala>do_something_with() was an inline func"
	  that made very heavy uset2136./a>of registers: reloading from 2137ala>stack and later reload.  To prevent the comp
ler from attacking yourt2138ala>code in this manner, write the following:t2139./a>t2140./a>        tmp_a = ACCESS_ONCE(a);t2141ala>        do_something_with(tmp_a);t2142./a>        do_something_else_with(tmp_a);t2143./a>t2144./a>For a fi al example, consider the following code, assuming that thet2145./a>2146./a>and never
  2  <.ocumenta"
L128" idioL128"
  2140./a72l ">2142./a>        do_something_else_with(tENOMEM;t<1a href="Documenta"
	 /at1omic_1ps.txt#L50" idline>2142./a>        do_something_else_with(tEE(a);t2142./a>        do_something_else_with(tEp_a);t21
	 s byt<1a href="Documenta"
	 /at1omic_153t#L134" idioL134"tioL123">2123./a>21
3./a>t2138ala>code in this manner, write the follmplicitt<1a href="Documenta"
	 /at1omic_15xt#L125" idioL125" class="line" namtioL125">21era"
	 t<1a href="Documenta"
	 /at1omic_15xt#L126" idioa72l42">2142./a>        do_something_else_with(tE"v2.6.35.a href="Documenta"
	 /at1omic_157>stackef="0(1ser 2ts >
  v2.6.32.13s the user of thruntime, 57./a>t<1a href="Documenta"
	 /at1omic_158" namtioL140">2140./a72l ">2142./a>        do_something_else_with(tEas in:t21 59./a>t<1a href="Documenta"
	 /at1omic_160t#L131" idioL13cL74" a>  1" cl surpri namtiioL11638" irunn144./an">2 62./a#L59" idioL59" class="line" namtioL59">21 E(a);tThis bamtiidioL1oL58>2 66./a>in42lized "linzeroine" namtioL1#L59" idioL59" class="line" namtioL59">21 p_a);t2137ala>stack adohen the ="line" lass="line" na138ala>code in this manner, write the follthread.t<1a href="Documenta"
	 /at1omic_16xt#L143" idioL143" class="line" namtioL143">21 of thet<1a href="Documenta"
	 /at1omic_16xt#L104" idioL104"2ts >
  v2.6.32.13s the user of thruntime, propert<1a href="Documenta"
	 /at1omic_16xt#L105" idioL105" class="line" nb)72l ">2142./a>        do_something_else_with(t6mic_t;t2142./a>        do_something_else_with(tith thet<1a href="Documenta"
	 /at1omic_16s.txt#L97" idioL97" cass="line" nb)72l42">2142./a>        do_something_else_with(truntimet<1a href="Documenta"
	 /at1omic_16s.txt#L98" idioL98" class="line" namtioL98">21 of thet<1a href="Documenta"
	 /at1omic_1ps.txtDL108" class="l-="lik-hebiutadohen the oL123iuta 69./a>ne" 36"L146">2146./a>a
mize accesses out of existence on the on1 memoryt<1a href="Documenta"
	 /at1omic_17s.txt#L2k2" cla3" claspts initializemtioL136">21a"line" nioL40">2 40!mize accesses out of existence on the on1 E(a);t21 71./a>t<1a href="Documenta"
	 /at1omic_1ps.txt#L72" idioL72ribed for ato DOES>*** WARNINANG: atomne" namtioL85">2 85./a>*** YOU HAVE BEEN WARN1RS! ***t<1a href="Documenta"
	 /at1omic_1ps.txt#L73" idioL73" class="line" namtioL73">21 73./a>t<1a href="Documenta"
	 /at1omic_1ps.txtNow" idimine"oimply re3" claspts initi txt#L8" iditypne" namne" namtiline" n#L73" idioL73" class="line" namtioL73">21 propert<1a href="Documenta"
	 /at1omic_1ps.txty rehelp7" clL75" idi38" o_something_with() and do_something_else_wd() andt<1a href="Documenta"
	 /at1omic_17s.txt#L16" idioL16" class="line" namtioL16">2 116./a>tse c(e" ni, 83./a>com*v2">2142./a>        do_something_else_with(t simplet<1a href="Documenta"
	 /at1omic_178.txt#L97" idvoi2 89./a>ssub(e" ni, 83./a>com*v2">2142./a>        do_something_else_with(t of thet<1a href="Documenta"
	 /at1omic_179.txt#L97" idvoi2 89./a>sinc(83./a>com*v2">2142./a>        do_something_else_with(t memoryt<1a href="Documenta"
	 /at1omic_180.txt#L97" idvoi2 89./a>sdec(83./a>com*v2">2142./a>        do_something_else_with(t E(a);t21omp
lert<1a href="Documenta"
	 /at1omic_18s.txt#L5sreiour riutmenThe c8./a>eubablctL12" ircl #L64" ito/ack ay regivler to do this (and you probably don't)how thet<1a href="Documenta"
	 /at1omic_1ps.txt83./a>comp
64"as les9" idiotwo riutmenThioL1ust take c12" idi that the return 2 djust/opt, clareaass="llat" cltwo ne" e" n"
	  or set with another opera"
	 .  A proper i1 84./a>t<1a href="Documenta"
	 /at1omic_1ps.txt djust/opt6./a>in" c"1"een declared vola"
le.  This is now discour() andt<1a href="Documenta"
	 /at1omic_1ps.txt#L86" idioL86" class="line" namtioL86">21 86./a>t<1a href="Documenta"
	 /at1omic_1ps.txtOnomethinn"
orts="lasa>Thby any  namwo riutmenThis example,y./a>***#L86" idioL86" class="line" namtioL86">21 raged.tcomine" nam#L21" idioe" SMP safe" classnsidered-harmful.txt for the complete ra"
	memoryt<1a href="Documenta"
	 /at1omic_19xt#L130" idioL130" class="line" namtioL130">21za"
	 st<1a href="Documenta"
	 /at1omic_1ps.txt#L58" idioL58" class="line" namtioL58">2 58ala>Next, w1e hand,t<1a href="Documenta"
	 /at1omic_19xt#L102" idioL102" class="line" namtioL102">21 other.t<1a href="Documenta"
	 /at1omic_19xt#L103" idioinamtioL7"sinc_tioL63(83./a>com*v2">2142./a>        do_something_else_with(t 93./a>t<1a href="Documenta"
	 /at1omic_194t#L103" idioinamtioL7"sdec_tioL63(83./a>com*v2">2142./a>        do_something_else_with(t 84./a>t<1a href="Documenta"
	 /at1omic_1ps.txt#L95" idioL95" class="line" namtioL95">21 95./a>t<1a href="Documenta"
	 /at1omic_1ps.txt#L5sreriutmenThe c818./a>eubablctL1,rriea>ThL114" cack ay regivler to do this (and you probably don't)> 0)t<1a href="Documenta"
	 /at1omic_1ps.txt83./a>com./a>tioL63"y renewline" namtioL62/a>impry barrier ishisr to do this (and you probably don't)&raged.tt<1a href="Documenta"
	 /at1omic_19s.txt#L19" idioL19" class="line" namtioL19">2 119./a>tand nets onv2 btioL145"">2 8a>impry barrier isL36"toL69" blocal_t is probably more appropriate. Pleaowing:t2 1ll="line" atomic in thoL145"">2 8a>impry bappropocal_t is probably more appropriate. Pleaocal_t.tTh mply re3" claocal_t is probably more appropriate. Pleao23./a>t2 25ala>plain gt; 0)t22r (;;)taalized smp_mb114./a>A>that  clo n#L73" idioL73" class="line" namtioL73">22ing();t2 8a>impry bappropbarrier isL#L73" idioL73" class="line" namtioL73">22i (i) }t22, thent22owing:t2 22./a#L62" iss=sfymtioLebine"r#L88 t clas,11">2 isr to do this (and you probably don't2 vala>t22lt; 0)t22ing();tThe fimine"oi" class="line" namtioL58">2 58ala>Next, w213./a>t22 loop.tcom*v2">2142./a>        do_something_else_with(215./a>tcom*v2">2142./a>        do_something_else_with(21ng();t2217./a>tjuste" name" namt{inc,dec}_tioL63() ./cept11">2 1117" idioL117" class="line" namtioL117">221 thentTivlebiniotioLhe settinterface"1"een declared vola"
le.  This is now disco2 19./a>tt2 22./aare"r#L88 tbeen declared vola"
le.  This is now disco2ast seet22ocal_t.t2 58ala>Next, w2 23./a>t22ers and
2_test(83./a>com*v2">2142./a>        do_something_else_with(2 reads.t2_test(83./a>com*v2">2142./a>        do_something_else_with(2 ng();t22{ (i) }t21ec t cla3byL1,rriea>ThL114" cle, consider the following code, assuming t2 = (i))tt22 2 22./aarae"dpry barrier isho be correct reflecting either the t22oad ift2_test(e" ni, 83./a>com*v2">2142./a>        do_something_else_with(2vy uset2 to thet2_test() ./cept11">2 11 ./atake #L98" idioL98" class="line" namtioL98">22g yourtTivlebiniotioLhe settinterface"1"e36"tor#L88 ts65" class#L98" idioL98" class="line" namtioL98">22g= (i))t2 22./aarae"dpry barrier is"
	 /local_ops.txt for the seman"
cs of lo39./a>t22CE(a);tcom*v2">2142./a>        do_something_else_with(2mp_a);t22mp_a);te c32" cly regivlebappropbine" namp
64"as A02" idioL102" class="line" namtioL102">22m23./a>t22mad ift2 22./aarae"dpry 02" idioL102" class="line" namtioL102">22my uset
 wfd al example,2c4"li2e" namtio611dvalgmic_o of thxt#L145" idioL145"2class="li2e" namtioL1ser hreft37" 2lasst24xt#L1#L5i" class="line" namtioL58">2 58ala>Next, w2 as in:t<2 href="DocumenioL140" cl2ss="l24s.txt#L19" idioL19" class="line" namtioL19">2 ENOMEM;t<2a href="Documenta"
	 /at2omic_2ps.txt#L50" idinamtioL7"sxchg(83./a>com*vioL87enew2">2142./a>        do_something_else_with(2EE(a);t22Ep_a);t22Ep_a);tt214arrier is"
	 /local_ops.txt for the seman"
cs of lomplicitt<2a href="Documenta"
	 /at2omic_25xt#L125" idioL125" class="line" namtioL125">22era"
	 t<2a href="Documenta"
	 /at2omic_256.txt#L15" idinamtioL7"scmpxchg(83./a>com*vioL87eoldioL87enew2">2142./a>        do_something_else_with(2Eo thet22 57./a>t<2a href="Documenta"
	 /at2omic_258.txt#L_t is onv2ine" appropb137aare"./cne" nis="line" nan99" iappropbmtaranv
mize accesses out of existence on the on2Eas in:t<2a href="Documenta"
	 /at2omic_2ps.txttioL64">2givlebold 46" idwlp
64"s. L namellmtioL7"sxxx atomic in 
mize accesses out of existence on the on2 59./a>t<2a href="Documenta"
	 /at2omic_260t#L1tioL7"scmpxchgla>bar by aiss=sfym123.tioL7"ity62">2 22./aas" nam" a> lde opaqut such that any kind of cast to a2 E(a);t2 92fm*vnd nets onv2 btth is smtioL7"sxxx atomic in 25" class="line" namtioL25">2 25ala>plain rp_a);t22thread.t<2a href="Documenta"
	 /at2omic_263t#L1tioL7"scmpxchglr#L88 ts65" class="line" namtioL/aarae"dpry barrier is"
	 /local_ops.txt for the seman"
cs of lo of thet<2a href="Documenta"
	 /at2omic_26s.txt#L14" idioL14" class="line" namtioL14">22 propert<2a href="Documenta"
	 /at2omic_26xt#L1ToL22">2 22./as="line" nacmpxchglrst operd fataass=" na0">2  vas="l>The cas>The #L14" idioL14" class="line" namtioL14">22 reads.t22runtimet<2a href="Documenta"
	 /at2omic_26s.txtFoL14ly" class="line" namtioL58">2 58ala>Next, w2 of thet<2a href="Documenta"
	 /at2omic_26s.txt#L19" idioL19" class="line" namtioL19">2  memoryt<2a href="Documenta"
	 /at2omic_27s.txt#L50" idinamtioL7"se c_unl2">(83./a>com*vioL87eaioL87eu2">2142./a>        do_something_else_with(2 E(a);t22 71./a>t<2a href="Documenta"
	 /at2omic_27xt#L122" idiappropbmtaranvs="line"#L8aline"u, the o135">2135e ca>  ne"v,plement for atomic_t's are the initializeRS! ***t<2a href="Documenta"
	 /at2omic_2ps.txtr#Docuasn135zeroin22"vs="l#L8aline"u3" claitor#Docuaszeroinclass="lcontmo be correct reflecting either the t<2a href="Documenta"
	 /at2omic_2ps.txte" appropbarrier is"
	 /local_ops.txt for the seman"
cs of lo propert<2a href="Documenta"
	 /at2omic_27xt#L125" idioL125" class="line" namtioL125">22d() andt<2a href="Documenta"
	 /at2omic_2ps.txt#L76" ie c_unl2">lr#L88 ts65" class="line" namtioL/aarae"dpry barrier is25" idioL125" class="line" namtioL125">22d26./a>tlss=fails (r#Docuas0do_something_with() and do_something_else_2 simplet<2a href="Documenta"
	 /at2omic_27s.txt#L98" idioL98" class="line" namtioL98">22 of thet<2a href="Documenta"
	 /at2omic_27s.txt83./a>cinc_ine_zero, #L88" idioine" namtioe c_unl2">(v,p1,111">2111./a>        while (ACCESS_ONCE(a) 2 memoryt<2a href="Documenta"
	 /at2omic_28xt#L130" idioL130" class="line" namtioL130">22 E(a);t22omp
lert<2a href="Documenta"
	 /at2omic_28xt#L122"a4./a> clasL88 ts6"line" namtioL62">2 22./aarae"dpe" approp_s#L98" idioL98" class="line" namtioL98">22how thet<2a href="Documenta"
	 /at2omic_28xt#L1arrier ish#L62" he comp
ln=Docume"mtara,ed sehby atxt#L8" idiaca02" idioL102" class="line" namtioL102">22iablts.t<2a href="Documenta"
	 /at2omic_2ps.txt0">2  va#L62" oL9onters4" cla" class="line" namtioL58">2 58ala>Next, w2 84./a>t<2a href="Documenta"
	 /at2omic_28xt#L125" idioL125" class="line" namtioL125">22r() andt<2a href="Documenta"
	 /at2omic_286.txt#L15" idvoi2 smp_mb__blL145_ namtiodec(voi22">2142./a>        do_something_else_with(2 86./a>t<2a href="Documenta"
	 /at2omic_28s.txt#L97" idvoi2 smp_mb__8a>im_ namtiodec(voi22">2142./a>        do_something_else_with(2  (i) }t2142./a>        do_something_else_with(2 of thet<2a href="Documenta"
	 /at2omic_289.txt#L97" idvoi2 smp_mb__8a>im_ namtioinc(voi22">2142./a>        do_something_else_with(2	memoryt<2a href="Documenta"
	 /at2omic_29xt#L130" idioL130" class="line" namtioL130">22za"
	 st<2a href="Documenta"
	 /at2omic_2ps.txt16" " class="smp_mb__blL145_ namtiodec()="line" namti" namso" class="line" namtioL58">2 58ala>Next, w2e hand,t<2a href="Documenta"
	 /at2omic_29xt#L102" idioL102" class="line" namtioL102">22 other.t<2a href="Documenta"
	 /at2omic_29xt#L103" idioobj0">2 dtioL= 1">2142./a>        do_something_else_with(2	ablts.t<2a href="Documenta"
	 /at2omic_294t#L103" idiosmp_mb__blL145_ namtiodec()">2142./a>        do_something_else_with(2	84./a>t<2a href="Documenta"
	 /at2omic_29s.txt#L15" id namtiodec(s="liobj0">2 ./a_/ae" )">2142./a>        do_something_else_with(2	() andt<2a href="Documenta"
	 /at2omic_29s.txt#L26" idioL26" class="line" namtioL26">2 > 0)t<2a href="Documenta"
	 /at2omic_2ps.txt"toLakidis134./a>2 1ll="line" atomic in tprecedhen ththenamtiodec()#L26" idioL26" class="line" namtioL26">2 & (i) }tAd nestrongy a namtioLe" nariea>Th mply re3" cla./ae" na#L26" idioL26" class="line" namtioL26">2 &of thet<2a href="Documenta"
	 /at2omic_29s.txtarrier isL36"nmtioLebine"" class="idi">2 76./asn"eed 9" iaslign cla3obe likely to manufacture this addi"
	 al 3119./a>t<3  href="Documenta"
	 /at3mmic_3txt#L1"1"amtiibj0">2 dtioLa>bare" glob" namwhich simplioL1163pus blL145">21e likely to manufacture this addi"
	 al 3119./a>t<3  href="Documenta"
	 /at3c_ops3txt#L1appropbine" nam1ec t cla8ala>23ocal_t.t<3href="Documenta"
	 /atom3c_ops3txt#L1W123iuta9" i5" class=smp_mb__blL145_ namtiodec()="lll cle, consider the following code, assuming t3o23./a>t<3href="Documenta"
	 /atom3c_ops3txt#L1n"
	e class="l=dioL13leg" nam clawly re3" cla./ae" nam#L21" iwhich s consider the following code, assuming t3o53./a>t<3h href="Documenta"
	 /at3c_ops30s.txtmplioL1163pus blL145">21e"obj0">2 dtioL= 1""aaslign cla8ala>t<3h href="Documenta"
	 /at3c_ops30s.txt#L26" idioL26" class="line" namtioL26">23ing();t23i (i) }t<3href="Documenta"
	 /atom3c_ops30s.txt namtll tw" nariea>Th mpl"line" atomic in t8a>impe" approp_dec()="lll#L98" idioL98" class="line" namtioL98">23i9(i) }t<3h href="Documenta"
	 /at3c_ops30s.txt(smp_mb__8a>im_ namtiodec()89">2 8rae"dpenamtioinc()="lll be correct reflecting either the im}_ namtioinc()do_something_with() and do_something_else_3 vala>t23lt; 0)t2 "line" namtioL65lass="lasestwhe45">21yaare"r#L88 tbhat may#L71" idioL71" class="line" namtioL71">23lcal_t.t<3href="Documenta"
	 /atom3c_ops31s.txt83./a>comn"
	e class="l=ebine"3e" oL58>disastrous rier fsas He45"isr to do this (and you probably don't313./a>t2 at" cn oc">2 "line"#L8ene" namass="Linuxr to do this (and you probably don't3153./a>t<3href="Documenta"
	 /atom3c_ops3ps.txtk cnelas "toisliza"
	 7" class="./ae" nariabln"
	e cla rioL81"cy#L71" idioL71" class="line" namtioL71">23l63./a>t<3href="Documenta"
	 /atom3c_ops316.txt/ae" "li>2 87.ss=worksmtioL11">2 omighs="line" namf" nanablzero e ci1117" idioL117" class="line" namtioL117">231ng();tThe read is ">2 nplioL116  22ty="line" tioL83">2 ry babj>Th" class="line" namtioL58">2 58ala>Next, w317./a>t231 thent23 19./a>t<3a href="Documenta"
	 /at3c_ops320t#L1{#L26" idioL26" class="line" namtioL26">23 vala>t2 aThL11L= 1">2142./a>        do_something_else_with(3ast seet<3  href="Documenta"
	 /at3m_ops32xt#L142" idiolhatse c(s="liobj0">2 lhat, htio)">2142./a>        do_something_else_with(3acal_t.t<3a href="Documenta"
	 /at3c_ops3txt#L1}>2142./a>        do_something_else_with(3a3./a>t23ers and
<3a href="Documenta"
	 /at3c_ops32s.txt78" opbmoi2 abj_lhatsdel(ioL45" abj *abj)#L26" idioL26" class="line" namtioL26">23 63./a>t<3a href="Documenta"
	 /at3c_ops326.txt{#L26" idioL26" class="line" namtioL26">23 ng();t2 lhat)">2142./a>        do_something_else_with(3a7./a>t2 aThL11L= 0">2142./a>        do_something_else_with(3a thent2142./a>        do_something_else_with(3mp_a);t23cvala>t23 23ith().t2 aThL11)">2142./a>        do_something_else_with(3c23./a>t<3href="Documenta"
	 /atom3c_ops334t#L103" idioke"#e(obj)">2142./a>        do_something_else_with(3crs and
<3href="Documenta"
	 /atom3c_ops33s.txt}>2142./a>        do_something_else_with(3m63./a>t<3href="Documenta"
	 /atom3c_ops33s.txt#L26" idioL26" class="line" namtioL26">23to thet23g yourt23i thent2339./a>t2142./a>        do_something_else_with(3CE(a);t23mp_a);t2 nL58" s7L45" abj, lhat)">2142./a>        do_something_else_with(3mp_a);t2 ./ac" )">2142./a>        do_something_else_with(3m23./a>t<3  href="Documenta"
	 /at3m_ops344t#L112" idioL112" cln=Documabj">2142./a>        do_something_else_with(3Crs and
<3href="Documenta"
	 /atom3c_ops34s.txt#L15" id}>2142./a>        do_something_else_with(3my uset2142./a>        do_something_else_with(3Co thet
 wfd al example,3c4"li3e" nam}>2142./a>        do_something_else_with(3m yourt23 as in:t<3 href="DocumenioL140" cl3ss="l34s.txtmoi2 abj_poke(voi22#L98" idioL98" class="line" namtioL98">23ENOMEM;t<3a href="Documenta"
	 /at3omic_350t#L1{#L26" idioL26" class="line" namtioL26">23EE(a);t2142./a>        do_something_else_with(3Ep_a);t23Ep_a);t2142./a>        do_something_else_with(3r23./a>t<3a href="Documenta"
	 /at3omic_354t#L128" idioobj = abj_lhatspeek(s="liglob" _lhat)">2142./a>        do_something_else_with(3rrs and
<3a href="Documenta"
	 /at3omic_355t#L112" idiospin_un#L2k(s="liglob" _lhats#L2k)">2142./a>        do_something_else_with(3ry uset23Eo thetstackef="0(1serobj) {#L26" idioL26" class="line" namtioL26">23 57./a>t<3a href="Documenta"
	 /at3omic_358" namtioL140">2140./obj0">2 tio0">2 poke(obj)">2142./a>        do_something_else_with(3Eas in:t<3a href="Documenta"
	 /at3omic_35e" namtioL140">2140./L104"namtiodec_">2_test(s="liobj0">2 ./ac" )2#L98" idioL98" class="line" namtioL98">23 59./a>t<3a href="Documenta"
	 /at3omic_36xt#L140" idio03" idio">2140./obj_destroy(obj)">2142./a>        do_something_else_with(3 E(a);t2142./a>        do_something_else_with(3rp_a);t2142./a>        do_something_else_with(3rp_a);t23 of thet<3a href="Documenta"
	 /at3omic_36s.txtmoi2 abj_2 40out(ioL45" abj *abj)#L26" idioL26" class="line" namtioL26">23 propert<3a href="Documenta"
	 /at3omic_36xt#L1{#L26" idioL26" class="line" namtioL26">23 reads.t<3  href="Documenta"
	 /at3mmic_366.txt#L50" idspin_#L2k(s="liglob" _lhats#L2k)">2142./a>        do_something_else_with(3 o thet2142./a>        do_something_else_with(3 57./a>t<3a href="Documenta"
	 /at3omic_368t#L112" idiospin_un#L2k(s="liglob" _lhats#L2k)">2142./a>        do_something_else_with(3 of thet<3a href="Documenta"
	 /at3omic_36s.txt#L19" idioL19" class="line" namtioL19">23 memoryt<3a href="Documenta"
	 /at3omic_37s.txt#L50" idi104"namtiodec_">2_test(s="liobj0">2 ./ac" )2#L98" idioL98" class="line" namtioL98">23 E(a);t2142./a>        do_something_else_with(3 71./a>t<3a href="Documenta"
	 /at3omic_37xt#L1}>2142./a>        do_something_else_with(3RS! ***t<3a href="Documenta"
	 /at3omic_3ps.txt#L73" idioL73" class="line" namtioL73">23 73./a>t<3a href="Documenta"
	 /at3omic_3ps.txt(class="la sinterficaal" na2" idiARP queue" clage cla amass=#L73" idioL73" class="line" namtioL73">23 propert<3a href="Documenta"
	 /at3omic_37xt#L1 generic neighbour discov11638" ia2" idinetworking.  Olaf Kircn#L73" idioL73" class="line" namtioL73">23d() andt<3a href="Documenta"
	 /at3omic_3ps.txteiou"dpe bug wrt.="line" namtioL/aamake"#e_skb114#L91"./aosement for atomic_t's are the initializ3d26./a>t<3  href="Documenta"
	 /at3mmic_37s.txt#ththenamtios="line" namtioL6r#L88 t clas qune" clearly.2#L98" idioL98" class="line" namtioL98">23 57./a>t<3a href="Documenta"
	 /at3omic_37s.txt#L98" idioL98" class="line" namtioL98">23 of thet<3a href="Documenta"
	 /at3omic_37s.txtGivlebtioLebine"scht c="idiL69" blass="lasen"eed 9" iobj0">2 aThL11#L98" idioL98" class="line" namtioL98">23 memoryt<3a href="Documenta"
	 /at3omic_38xt#L1#L21" icontmat may abj lhat deleal" nbemwhich simplioL116prooL83orsr to do this (and you probably don't3 E(a);t21eappropbine" nam1ec t cla _t is onv2tbeen declared vola"
le.  This is now disco3omp
lert<3a href="Documenta"
	 /at3omic_38xt#L102" idioL102" class="line" namtioL102">23how thet<3a href="Documenta"
	 /at3omic_38xt#L1OoL11wise,hs="line" namdioL131"llnablzero, yetoobj0">2 aThL11L classstill#L98" idioL98" class="line" namtioL98">23iablts.t<3a href="Documenta"
	 /at3omic_3ps.txtbL22"t,hs=us triggmtll t9" iasleral" nin obj_destroy()as les9erroa#L26" idioL26" class="line" namtioL26">23 84./a>t<3a href="Documenta"
	 /at3omic_38xt#L1s#L8ence looks " namtila" class="line" namtioL58">2 58ala>Next, w3r() andt<3a href="Documenta"
	 /at3omic_3ps.txt#L86" idioL86" class="line" namtioL86">23 86./a>t<3a href="Documenta"
	 /at3omic_38s.txt#L97" idcpu 040" idio03" idio">2140./ idcpu 1#L86" idioL86" class="line" namtioL86">23 57./a>t<3  href="Documenta"
	 /at3mmic_38xt#L128" idioobj_poke()" idio03" idio">2140./obj_2 40out(2#L98" idioL98" class="line" namtioL98">23 of thet<3a href="Documenta"
	 /at3omic_389.txt#L97" idobj = abj_lhatspeek()">2142./a>        do_something_else_with(3	memoryt<3a href="Documenta"
	 /at3omic_39s.txt#L50" id... gains rifamtiibj,rriac" =2>2142./a>        do_something_else_with(3	E(a);t2142./a>        do_something_else_with(3e hand,t<3a href="Documenta"
	 /at3omic_39xt#L112" idioL112" cl                        abj0">2 aThL11L= 0d...>2142./a>        do_something_else_with(3eow thet<3a href="Documenta"
	 /at3omic_393t#L112" idioL112" clllllllllllllllllllllllll... whichil2ty=delayedd...>2142./a>        do_something_else_with(3eablts.t<3a href="Documenta"
	 /at3omic_394t#L112" idioL112" clllllllllllllllllllllllll"namtiodec_">2_test(2#L98" idioL98" class="line" namtioL98">23	84./a>t<3a href="Documenta"
	 /at3omic_39xt#L105" idioL105" clllllllllllllllllllllllll... riac"  drtioamti1d...>2142./a>        do_something_else_with(3e() andt<3a href="Documenta"
	 /at3omic_396.txt#L50" id"namtiodec_">2_test(2#L98" idioL98" class="line" namtioL98">23	86./a>t<3a href="Documenta"
	 /at3omic_397.txt#L50" id... riacne"  drtioamti0d...>2142./a>        do_something_else_with(3e57./a>t<3a href="Documenta"
	 /at3omic_39xt#L128" idioobj_destroy()>2142./a>        do_something_else_with(3eof thet<3a href="Documenta"
	 /at3omic_399.txt#L97" idBUG114#riggmts since obj0">2 aThL11#L98" idioL98" class="line" namtioL98">24119./a>t<4  href="Documenta"
	 /at4mmic_40s.txt#L50" idstill22"lebas oboot time before the second CPU is brought4119./a>t<4  href="Documenta"
	 /at4c_ops40_ops.txt#L1" idioL1"                         abj0">2 aThL11L#L21" iwhichil2ty=oc">2sr to do this (and you probably don't4owing:t24ocal_t.t<4href="Documenta"
	 /atom4c_ops4txt#L1W1233" c="line" namtioL62">2 22./ar#L88 tbhof#ththenamtios=atomic in 02" idioL102" class="line" namtioL102">24o4al_t.t<4h href="Documenta"
	 /at4c_ops40s.txt"
mizan=Docump
64"s,btioLebine"s#L8ence 36"L146">2whichil2ty="linidioL02" idioL102" class="line" namtioL102">24o5al_t.t<4h href="Documenta"
	 /at4c_ops40s.txthappesL36Specrfical4" ciebtioLebine"lasen"eed"namtiodec_">2_test(2#L98" idioL98" class="line" namtioL98">24o63./a>t<4h href="Documenta"
	 /at4c_ops406.txt/ae" nam1ec t cla  classmp
lbecL74"glob" namwhich sie" "lass=#L73" idioL73" class="line" namtioL73">24ing();t2 aThL11L#L21" ihe c.>2142./a>        do_something_else_with(4i (i) }t<4href="Documenta"
	 /atom4c_ops40s.txt#L98" idioL98" class="line" namtioL98">24i9(i) }t<4h href="Documenta"
	 /at4c_ops40s.txtA"la ilator2.alimp
e,h32-bidiSparcelass="li by a clawlusa nisbe likely to manufacture this addi"
	 al 4owing:tt<4href="Documenta"
	 /atom4c_ops41s.txt a>  spin#L2kas="lSMP safetyL36Sparc32 lack  cde"137aare"./a>ewap"e likely to manufacture this addi"
	 al 4owing:t24lcal_t.t<4href="Documenta"
	 /atom4c_ops41s.txtne" e"has33"L136"2fmspin#L2ks"ascht c="/a>2 1llne""y reiull232-bid02" idioL102" class="line" namtioL102">24l4al_t.t<4href="Documenta"
	 /atom4c_ops41s.txt/ae" namne"be"r#alizedas Esle" "al4" ce" array"2fmspin#L2ksiaca02" idioL102" class="line" namtioL102">24153./a>t<4href="Documenta"
	 /atom4c_ops4ps.txtindex"linene"baass=upan99" iaddr2">lof#ththenamtios=bell tatomicement for atomic_t's are the initializ4l63./a>t<4href="Documenta"
	 /atom4c_ops416.txton>2 87.examp"L2kaprp
ectspry bappropbarrier isL  Pariscelassass=#L73" idioL73" class="line" namtioL73">241ng();t2142./a>        do_something_else_with(417./a>t241 thent24 19./a>t<4a href="Documenta"
	 /at4c_ops420t#L1ext t cy ailawloe"e" old 386.>2142./a>        do_something_else_with(4 vala>t24ast seet<4  href="Documenta"
	 /at4m_ops42xt#L1WeLa>barnowlinvimpry bappropbbidmask atomic in 2  YouLa>barfi87.exam#L71" idioL71" class="line" namtioL71">24acal_t.t<4a href="Documenta"
	 /at4c_ops423t#L1y ri"lSMP  87."line" namtioL62">2 22./aare sinilaL65lashape"./a>ecato#L71" idioL71" class="line" namtioL71">24a4al_t.t<4a href="Documenta"
	 /at4c_ops42s.txtmply re3" claos=ats ebine"
	 /local_ops.txt for the seman"
cs of l4ers and
<4a href="Documenta"
	 /at4c_ops42xt#L125" idioL125" class="line" namtioL125">24 63./a>t<4a href="Documenta"
	 /at4c_ops426.txtNahL11Lappropbbid atomic in t8rna0">2  va"li tomiceloe"abj>Tha> lignement for atomic_t's are the initializ4 ng();t2 8re leashby anyam#L71" idioL71" class="line" namtioL71">24a7./a>tlof#ththbid 9w" n5laeaiza"unsignem" nam"aa45">21e likely to manufacture this addi"
	 al 4a thentlof#ththcpu"
	 /local_ops.txt for the seman"
cs of l4mp_a);t24cvala>t2142./a>        do_something_else_with(4 2142./a>        do_something_else_with(4 cal_t.t<4href="Documenta"
	 /atom4c_ops43xt#L103" idiovoi2 cne" n_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(4 4al_t.t<4href="Documenta"
	 /atom4c_ops43s.txt#L14" idioL14" class="line" namtioL14">24crs and
<4href="Documenta"
	 /atom4c_ops43xt#L1ToLsreriutmenTh2"t,hclear,9">2 cne" n,rriea>ThL114" cle,bbid numboL02" idioL102" class="line" namtioL102">24m63./a>t<4href="Documenta"
	 /atom4c_ops43s.txtnadicaaebhat "nr"aan99" ibid mask potxt#va"liat "ADDR"een declared vola"
le.  This is now disco4to thet24g yourt2 22./ar#L88 tbhof#thtseatxt#L8" ideen declared vola"
le.  This is now disco439./a>t24CE(a);t2_set_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(4mp_a);t2_clear_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(4mp_a);t2_cne" n_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(4m23./a>t<4  href="Documenta"
	 /at4m_ops44s.txt#L14" idioL14" class="line" namtioL14">24Crs and
<4href="Documenta"
	 /atom4c_ops44s.txtL namtioLebine, ./cept11">2 toLsreriutmenThn=Docume"linlee" "
miz#L14" idioL14" class="line" namtioL14">24C63./a>t<4href="Documenta"
	 /atom4c_ops44s.txtnadicaaestwheeads are cne" ndibid Las sehb_BEFORE_pry bappropbbid#L14" idioL14" class="line" namtioL14">24Co thet
 wfd al example,4c4"li4e" namarrier is"
	 /local_ops.txt for the seman"
cs of l4m yourt24 as in:t<4 href="DocumenioL140" cl4ss="l44s.txtWARNING! "toislinc tdib" namportant11">2 toLbmtarane" t"linlee"
mize accesses out of existence on the on4ENOMEM;t<4a href="Documenta"
	 /at4omic_450t#L1ieas"0"aare"1"e36Dosmp
lte" ne"be"fancy"./a>eL58>a fewbinioL45" in tbf that with a proper implicit or explicit4EE(a);tj69" n=Docull tsome n5lg " na that with a proper implicit or explicit4Ep_a);t2 a>barnos=work"
	 /local_ops.txt for the seman"
cs of l4Ep_a);t24r23./a>t<4a href="Documenta"
	 /at4omic_454t#L116" ontm n5lg, the on=Docump
64" getsprruncaaebhablnla ama>2 y638" #L73" idioL73" class="line" namtioL73">24rrs and
<4a href="Documenta"
	 /at4omic_455t#L1path ts=ll t9" seatxt#L8" id,tsoaan964-biddi109" ibid is sehbamass=#L73" idioL73" class="line" namtioL73">24ry usetbarndioL22"l71">2"
	 /local_ops.txt for the seman"
cs of l4Eo thet24 57./a>t<4a href="Documenta"
	 /at4omic_458" naOntmgre91"./classhof#whe45">2_t iroblem crtioauplrst opernamtad_info#L57" idioL57" class="line" namtioL57">24 as in:t<4a href="Documenta"
	 /at4omic_45e" naflag atomic in 2  RiutmenTh2ioL1aassest_">2_set_ti_namtad_flag()="hop#L57" idioL57" class="line" namtioL57">24 59./a>t<4a href="Documenta"
	 /at4omic_46xt#L1are riDocump
64" nene"e" natas les45"a45"ioL116pl" idiwhe45">2_ng e likely to manufacture this addi"
	 al 4 E(a);t2cl/a#ellL#L73" idioL73" class="line" namtioL73">24rp_a);t24rp_a);t2 22./aarae"dpry ir ex"cut isL  All#L98" idioL98" class="line" namtioL98">24 propert<4a href="Documenta"
	 /at4omic_46xt#L1"line" atomic in tblL145">21eappropbbid atomic in="llliL69" blama" #L73" idioL73" class="line" namtioL73">24 reads.t<4  href="Documenta"
	 /at4mmic_466.txtwhich siglob" namblL145">21eappropbbid atomic in=" ima" mwhich sL#L73" idioL73" class="line" namtioL73">24ro thet24r57./a>t<4a href="Documenta"
	 /at4omic_468t#L1subs#L8entl"line" atomic in=" ima" mwhich sL  16" " class" class="line" namtioL58">2 58ala>Next, w4 of thet<4a href="Documenta"
	 /at4omic_46s.txt#L19" idioL19" class="line" namtioL19">24 memoryt<4a href="Documenta"
	 /at4omic_47s.txt#L50" idobj0">2 dtioL= 1">2142./a>        do_something_else_with(4 E(a);t2_set_bid(0, s="liobj0">2 flags)2#L98" idioL98" class="line" namtioL98">24 71./a>t<4a href="Documenta"
	 /at4omic_47xt#L112" idioL112" cl/*d... */">2142./a>        do_something_else_with(4 p_a);t2 k>baeoL= 1">2142./a>        do_something_else_with(4 of thet<4a href="Documenta"
	 /at4omic_47s.txt#L14" idioL14" class="line" namtioL14">24 propert<4a href="Documenta"
	 /at4omic_47xt#L1ToL2n"
	e class="l=of#test_">2_set_bid()=L69" The read anyam#L71" idioL71" class="line" namtioL71">24d() andt<4a href="Documenta"
	 /at4omic_4ps.txt"obj0">2 dtioL= 1""a" iwhich simpl3pus blL145">21eappropb"line" atomic in#L71" idioL71" class="line" namtioL71">24do thet2_set_bid()=becL74smwhich sL  L nawise,hs="lapprop#L71" idioL71" class="line" namtioL71">24d57./a>t<4a href="Documenta"
	 /at4omic_47s.txt"line" atomic in=contmat mest_">2_set_bid()=L69" blcL74"which siblL145#L71" idioL71" class="line" namtioL71">24dof thet<4a href="Documenta"
	 /at4omic_47s.txt"obj0">2 k>baeoL= 1""a" iwhich sL#L73" idioL73" class="line" namtioL73">24 memoryt<4a href="Documenta"
	 /at4omic_48xt#L130" idioL130" class="line" namtioL130">24 E(a);t2 58ala>Next, w4omp
lert<4a href="Documenta"
	 /at4omic_48xt#L102" idioL102" class="line" namtioL102">24how thet<4a href="Documenta"
	 /at4omic_48xt#L103" idioinamtest_bid(unsignem" nam nL,h__cin t__hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(4iablts.t<4a href="Documenta"
	 /at4omic_48s.txt#L14" idioL14" class="line" namtioL14">24 84./a>t<4a href="Documenta"
	 /at4omic_48xt#L1W
mizan=Docusme"linlee" nadicaall ti10bace"nr"ais sehbamass=bbidmask#L14" idioL14" class="line" namtioL14">24 () andt<4a href="Documenta"
	 /at4omic_4ps.txtpotxt#va"liat "addr"een declared vola"
le.  This is now disco4 86./a>t<4a href="Documenta"
	 /at4omic_48s.txt#L57" idioL57" class="line" namtioL57">24 57./a>t<4  href="Documenta"
	 /at4mmic_48xt#L1If65" class="line" namtioL/aare"r#L88 tbharae"dpclear_bid() ("
miz#L14" idioL14" class="line" namtioL14">24 of thet<4a href="Documenta"
	 /at4omic_489.txthe comp
ln=Docume"mtara,ed"dpryus he comp
lness="linein    "line"#L14" idioL14" class="line" namtioL14">24	memoryt<4a href="Documenta"
	 /at4omic_49s.txtnamtioL62">2 22./),hswoatxt#L8" idiacainein   d" class="line" namtioL58">2 58ala>Next, w4	E(a);t24e hand,t<4a href="Documenta"
	 /at4omic_492ops.txt#L1" voi2 smp_mb__blL145_clear_bid(voi22">2142./a>        do_something_else_with(4eow thet<4a href="Documenta"
	 /at4omic_49xt#L103" idiovoi2 smp_mb__8a>im_clear_bid(voi22">2142./a>        do_something_else_with(4eablts.t<4a href="Documenta"
	 /at4omic_49s.txt#L14" idioL14" class="line" namtioL14">24	84./a>t<4a href="Documenta"
	 /at4omic_49xt#L1ToLycd nelass=as ="line",9">2 8re akamasopry ir enamtios=atomic in#L14" idioL14" class="line" namtioL14">24	() andt<4a href="Documenta"
	 /at4omic_496.txtbrioL11a" class="line" namtioL58">2 58ala>Next, w4	86./a>t<4a href="Documenta"
	 /at4omic_49s.txt#L57" idioL57" class="line" namtioL57">24e57./a>t<4a href="Documenta"
	 /at4omic_49xt#L128" idio/*dAll="line" atomic in tblL145">2is "llliwill#L98" idioL98" class="line" namtioL98">24eof thet<4a href="Documenta"
	 /at4omic_499.txt#L97" id *re" glob" namwhich siblL145">21eclear_bid()een declared vola"
le.  This is now disco5119./a>t<5  href="Documenta"
	 /at5mmic_50s.txt#L50" id */en declared vola"
le.  This is now disco5119./a>t<5  href="Documenta"
	 /at5c_ops50_ops.txt#L1" smp_mb__blL145_clear_bid(2">2142./a>        do_something_else_with(5owing:t2142./a>        do_something_else_with(5o3ing:t25o4al_t.t<5h href="Documenta"
	 /at5c_ops504t#L128" idio/*dT21eclear_bid()La>bare" which siblL145"lll#L98" idioL98" class="line" namtioL98">25o5al_t.t<5h href="Documenta"
	 /at5c_ops505.txt#L97" id *rsubs#L8entl"line" atomic indeen declared vola"
le.  This is now disco5o63./a>t<5h href="Documenta"
	 /at5c_ops506.txt#L50" id */en declared vola"
le.  This is now disco5173./a>t<5h href="Documenta"
	 /at5c_ops507.txt#L50" id smp_mb__8a>im_clear_bid(2">2142./a>        do_something_else_with(5o83./a>t<5h href="Documenta"
	 /at5c_ops50s.txt#L98" idioL98" class="line" namtioL98">25i9(i) }t<5h href="Documenta"
	 /at5c_ops50s.txtles45"a45"swoaea>Tialbbidtioaw" na"L2kanamtioL62">2 22./a(acL88 t/release
mize accesses out of existence on the on5owing:tt<5href="Documenta"
	 /atom5c_ops51s.txtpostfix"livari2 2s, ./cept11">2 toLycd ne"linein    acL88 t/release62">2 22./
mize accesses out of existence on the on5owing:tThL114"inclassmee"s toLyc"line" namtis="lbid_spin_try"L2kalement for atomic_t's are the initializ5lcal_t.t<5href="Documenta"
	 /atom5c_ops51s.txtbid_spin_un#L2k=typ" atomic in tw123iutaea>Tifyll t2 y6m145"namtioL/een declared vola"
le.  This is now disco5l4al_t.t<5href="Documenta"
	 /atom5c_ops51s.txt#L14" idioL14" class="line" namtioL14">25153./a>t<5href="Documenta"
	 /atom5c_ops515t#L103" idioinamtest_">2_set_bid_#L2k(unsignem" nam nL,he"signem" nam *addr)">2142./a>        do_something_else_with(5l63./a>t<5href="Documenta"
	 /atom5c_ops516.txt#L15" idvoi2 clear_bid_un#L2k(unsignem" nam nL,he"signem" nam *addr)">2142./a>        do_something_else_with(5l73./a>t<5href="Documenta"
	 /atom5c_ops51s.txt#L97" idvoi2 __clear_bid_un#L2k(unsignem" nam nL,he"signem" nam *addr)">2142./a>        do_something_else_with(5l83./a>t<5href="Documenta"
	 /atom5c_ops51s.txt#L98" idioL98" class="line" namtioL98">251 thentt<5a href="Documenta"
	 /at5c_ops520t#L1un#L2k namtioL62">2 22./inclass"line" namfuldi109" i#L2k itself _t iro
ectll e likely to manufacture this addi"
	 al 5 19./a>t<5a href="Documenta"
	 /at5c_ops52s.txttoL2line" bids3amass=bworbeen declared vola"
le.  This is now disco5ast seet<5  href="Documenta"
	 /at5m_ops52xt#L102" idioL102" class="line" namtioL102">25acal_t.t<5a href="Documenta"
	 /at5c_ops523t#L1FoL14ly,othe45"a45"non-ne" na voL/ in>lof#ththbidmask atomic in 02" idioL102" class="line" namtioL102">25a4al_t.t<5a href="Documenta"
	 /at5c_ops52s.txtnein   das lesycd nelass=il=dintextdiwhe45"some2line" higne"-ldiollSMP02" idioL102" class="line" namtioL102">25a53./a>t<5a href="Documenta"
	 /at5c_ops52xt#L1#L2kll tscht c _t bell tlass="lineit>Th mhthbidmask,ed"dpryus l2">02" idioL102" class="line" namtioL102">25a63./a>t<5a href="Documenta"
	 /at5c_ops526.txtexpe"siv5"non-ne" na atomic in tmayne" namtiamass=bn"
	e class="leen declared vola"
le.  This is now disco5a73./a>t<5a href="Documenta"
	 /at5c_ops527t#L1ToLycoL58>"
	 s sinilaL6mply re3bine"bidmask atomic inatxt#L8" id,en declared vola"
le.  This is now disco5a83./a>t<5a href="Documenta"
	 /at5c_ops5txt#L1./cept11">2 twoaundoL/coridiacaineefix"limply retxt#L8" ia"
	 een declared vola"
le.  This is now disco5a thent25mp_a);t2142./a>        do_something_else_with(5cvala>t2142./a>        do_something_else_with(5 2142./a>        do_something_else_with(5 cal_t.t<5href="Documenta"
	 /atom5c_ops53xt#L103" idioinam__test_">2_set_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(5 4al_t.t<5href="Documenta"
	 /atom5c_ops534t#L103" idioinam__test_">2_clear_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(5 53./a>t<5href="Documenta"
	 /atom5c_ops535t#L103" idioinam__test_">2_cne" n_bid(unsignem" nam nL,hvols=" sie"signem" nam *addr)">2142./a>        do_something_else_with(5 63./a>t<5href="Documenta"
	 /atom5c_ops53s.txt#L26" idioL26" class="line" namtioL26">25to thetTialb"line"#L14" idioL14" class="line" namtioL14">25g yourt2 22./i#L14" idioL14" class="line" namtioL14">25g thent2539./a>t253vala>t>21eappropb">2 bid atomic in tn=Docull t#L64" i#L14" idioL14" class="line" namtioL14">25mp_a);t25mp_a);t2 rw#L2ksioL58>"line" namtioL6expectic in tl/a#ellL#L73" idioL73" class="line" namtioL73">25m23./a>t<5  href="Documenta"
	 /at5m_ops54s.txtles ru simpl="lineais silass" class="line" namtioL58">2 58ala>Next, w5Crs and
<5href="Documenta"
	 /atom5c_ops54xt#L125" idioL125" class="line" namtioL125">25C63./a>t<5href="Documenta"
	 /atom5c_ops54s.txt1) W claacL88 ll t2i#L2k,ass=bn"
	e class="l=L69" Laki"idi"lob" na25" idioL125" class="line" namtioL125">25Co thet
 wfd al example,5c4"li54s.txt#L9which siblL145"l y6eubs#L8entl"line" atomic inL#L73" idioL73" class="line" namtioL73">25m yourt25 as in:t<5 href="DocumenioL140" cl5ss="l54s.txt2) W clareleasll t2i#L2k,ass=bn"
	e class="l=L69" Laki"iditioL11">2#L98" idioL98" class="line" namtioL98">25ENOMEM;t<5a href="Documenta"
	 /at5omic_550.txt#L9lllineevious "line" atomic in t8r" glob" namwhich siblL145">21#L98" idioL98" class="line" namtioL98">25Evala>t25Ep_a);t25Ep_a);t2_#L2k()as les45"="lan#L14" idioL14" class="line" namtioL14">25r23./a>t<5a href="Documenta"
	 /at5omic_554t#L1archit>Thure-neutralbvoL/ in=""
	e clamtiamalib/dec_">2_#L2k.c,en declared vola"
le.  This is now disco5rrs and
<5a href="Documenta"
	 /at5omic_555t#L1bu" Lo9" pls=onv2s a>barwis33"li ttiniz5">2is iniaslemh srL#L73" idioL73" class="line" namtioL73">25E63./a>t<5a href="Documenta"
	 /at5omic_55s.txt#L26" idioL26" class="line" namtioL26">25Eo thetstackef="0(1nam_e" namtdec_">2_#L2k(enamtios=*ne" na, spin#L2kos=*#L2k)">2142./a>        do_something_else_with(5 57./a>t<5a href="Documenta"
	 /at5omic_55s.txt#L98" idioL98" class="line" namtioL98">25 as in:t<5a href="Documenta"
	 /at5omic_55e" naAe" na14lyo1ec t cla ss=bgivleb/ae" na>2 87.sf a>bardrtinablzero#L98" idioL98" class="line" namtioL98">25 59./a>t<5a href="Documenta"
	 /at5omic_56xt#L1ae" na14lyoacL88 t ss=bgivlebspin#L2ka 87.is onv2 ss=b1ec t cla#L98" idioL98" class="line" namtioL98">25 vala>t25rp_a);t25 of thet<5a href="Documenta"
	 /at5omic_56s.txt"toislacsu14lyoneetty silassnablgetothe>"line" namtioL6corr>ThL#L73" idioL73" class="line" namtioL73">25rrs and
<5a href="Documenta"
	 /at5omic_56xt#L1Silasy sss=sfy3" c=spin#L2k grab6r#L88 t clas="#L62" " imana that with a proper implicit or explicit5 reads.t<5  href="Documenta"
	 /at5mmic_566.txtsu t ss=bspin#L2k atomic in=" iglob" namwhich siblL145"2 y#L73" idioL73" class="line" namtioL73">25ro thet25r57./a>t<5a href="Documenta"
	 /at5omic_56s.txt#L98" idioL98" class="line" namtioL98">25 of thet<5a href="Documenta"
	 /at5omic_56s.txtWes"lindlinnioLiceltila=otomic in=L145"clearly.sf ana0">2  #L98" idioL98" class="line" namtioL98">25 memoryt<5a href="Documenta"
	 /at5omic_57s.txte" abioLics=ne" na atomic in" class="line" namtioL58">2 58ala>Next, w5 E(a);t25 71./a>t<5a href="Documenta"
	 /at5omic_57xt#L112" idio nam cas( nam *"li,o nam old,o nam new)">2142./a>        do_something_else_with(5 p_a);t25 of thet<5a href="Documenta"
	 /at5omic_57s.txt"1as"ast 87sis="l"137aare"./a>ewap"as "tLappropal4"" class="line" namtioL58">2 58ala>Next, w5 rs and
<5a href="Documenta"
	 /at5omic_57xt#L125" idioL125" class="line" namtioL125">25d() andt<5a href="Documenta"
	 /at5omic_57s.txt1) C37aares "old"aw1233" c=p
64" curr>ntlyoace""li"een declared vola"
le.  This is now disco5do thett<5a href="Documenta"
	 /at5omic_57s.txt3) Regardl2">,hs="liurr>nt=p
64" ace""li" e on=Docutbeen declared vola"
le.  This is now disco5dof thet<5a href="Documenta"
	 /at5omic_57s.txt#L19" idioL19" class="line" namtioL19">25 memoryt<5a href="Documenta"
	 /at5omic_58xt#L1A"lan"./classhusa n, es45"="lwa>2 1neappropbine" nam#L21" #L19" idioL19" class="line" namtioL19">25 E(a);t2 58ala>Next, w5omp
lert<5a href="Documenta"
	 /at5omic_58xt#L102" idioL102" class="line" namtioL102">25how thet<5a href="Documenta"
	 /at5omic_58xt#L1voi2 ./class_e" namtinc( nam *ine" na2#L98" idioL98" class="line" namtioL98">25iablts.t<5a href="Documenta"
	 /at5omic_58s.txt{#L26" idioL26" class="line" namtioL26">25 84./a>t<5a href="Documenta"
	 /at5omic_585t#L112" idio nam old,onew,rrit;e likely to manufacture this addi"
	 al 5 () andt<5a href="Documenta"
	 /at5omic_5ps.txt#L86" idioL86" class="line" namtioL86">25 86./a>t<5a href="Documenta"
	 /at5omic_58s.txt#L97" id#L6ssh(1) {#L26" idioL26" class="line" namtioL26">25 57./a>t<5  href="Documenta"
	 /at5mmic_588" namtioL140">2140./oloL= *ine" na;e likely to manufacture this addi"
	 al 5 of thet<5a href="Documenta"
	 /at5omic_58e" namtioL140">2140./new = aloL+ 1">2142./a>        do_something_else_with(5	memoryt<5a href="Documenta"
	 /at5omic_59xt#L130" idioL130" class="line" namtioL130">25	E(a);t2old,onew)">2142./a>        do_something_else_with(5e hand,t<5a href="Documenta"
	 /at5omic_59xt#L112" idioL112" cli104rit == alo2#L98" idioL98" class="line" namtioL98">25eow thet<5a href="Documenta"
	 /at5omic_593t#L112" idioL112" clllllllllbreak">2142./a>        do_something_else_with(5eablts.t<5a href="Documenta"
	 /at5omic_594t#L112" idio}>2142./a>        do_something_else_with(5	84./a>t<5a href="Documenta"
	 /at5omic_59xt#L1}>2142./a>        do_something_else_with(5	() andt<5a href="Documenta"
	 /at5omic_59s.txt#L86" idioL86" class="line" namtioL86">25	86./a>t<5a href="Documenta"
	 /at5omic_59s.txtLet' ts=e"las()nin ordnamne"buil cdepseudo-Cd"namtiodec_">2_#L2k()" class="line" namtioL58">2 58ala>Next, w5e57./a>t<5a href="Documenta"
	 /at5omic_59s.txt#L98" idioL98" class="line" namtioL98">25eof thet<5a href="Documenta"
	 /at5omic_599.txt1nam_e" namtdec_">2_#L2k(enamtios=*ne" na, spin#L2kos=*#L2k)#L98" idioL98" class="line" namtioL98">26119./a>t<6  href="Documenta"
	 /at6mmic_600t#L1{#L26" idioL26" class="line" namtioL26">26119./a>t<6  href="Documenta"
	 /at6c_ops60_ops.txt#L1"  nam old,onew,rrit;e likely to manufacture this addi"
	 al 6owing:t26o4al_t.t<6h href="Documenta"
	 /at6c_ops604t#L128" idiowufa_to_zeroL= 0;e likely to manufacture this addi"
	 al 6o5al_t.t<6h href="Documenta"
	 /at6c_ops605.txt#L97" id#L6ssh(1) {#L26" idioL26" class="line" namtioL26">26o63./a>t<6h href="Documenta"
	 /at6c_ops606.txt#L50" id >2140./oloL= ne" nammtad(enamti)">2142./a>        do_something_else_with(6173./a>t<6h href="Documenta"
	 /at6c_ops607.txt#L50" id >2140./new = aloL- 1">2142./a>        do_something_else_with(6o83./a>t<6h href="Documenta"
	 /at6c_ops608" namtioL140">2140./i104new == 0) {#L26" idioL26" class="line" namtioL26">26o93./a>t<6h href="Documenta"
	 /at6c_ops60e" namtioL140">2140./28" idiowufa_to_zeroL= 1">2142./a>        do_something_else_with(6owing:t2140./spin_#L2k(#L2k)">2142./a>        do_something_else_with(6o19./a>t<6href="Documenta"
	 /atom6c_ops61_ops.txt#L1" idioL1" }>2142./a>        do_something_else_with(6owing:t2142./a>        do_something_else_with(6lcal_t.t<6href="Documenta"
	 /atom6c_ops613t#L112" idioL112" cli104rit == alo2#L98" idioL98" class="line" namtioL98">26l4al_t.t<6href="Documenta"
	 /atom6c_ops614t#L112" idioL112" clllllllllbreak">2142./a>        do_something_else_with(6153./a>t<6href="Documenta"
	 /atom6c_ops61xt#L105" idioL105" cli104wufa_to_zero) {#L26" idioL26" class="line" namtioL26">26l63./a>t<6href="Documenta"
	 /atom6c_ops616.txt#L50" id >2140./">2140./spin_un#L2k(#L2k)">2142./a>        do_something_else_with(6o73./a>t<6href="Documenta"
	 /atom6c_ops617.txt#L50" id >2140./////////wufa_to_zeroL= 0;e likely to manufacture this addi"
	 al 6l83./a>t<6href="Documenta"
	 /atom6c_ops618" namtioL140">2140./}>2142./a>        do_something_else_with(6o93./a>t<6href="Documenta"
	 /atom6c_ops619t#L112" idio}>2142./a>        do_something_else_with(6 19./a>t<6a href="Documenta"
	 /at6c_ops62xt#L130" idioL130" class="line" namtioL130">26 19./a>t<6a href="Documenta"
	 /at6c_ops62_ops.txt#L1" n=Documwufa_to_zero;e likely to manufacture this addi"
	 al 6ast seet<6  href="Documenta"
	 /at6m_ops62xt#L1}>2142./a>        do_something_else_with(6acal_t.t<6a href="Documenta"
	 /at6c_ops62s.txt#L73" idioL73" class="line" namtioL73">26a4al_t.t<6a href="Documenta"
	 /at6c_ops62s.txtNow,ras =a2cl/a"line" namtioL/ago,ras  nam aasspin_#L2k()#L73" idioL73" class="line" namtioL73">26a53./a>t<6a href="Documenta"
	 /at6c_ops62xt#L1strictlyoordnas9lllisubs#L8entl"line" atomic ind (includll e likely to manufacture this addi"
	 al 6a63./a>t<6a href="Documenta"
	 /at6c_ops626.txtss="las())aw1233riea>Thhablntself,">2_ng La>bare" >2  een declared vola"
le.  This is now disco6a73./a>t<6a href="Documenta"
	 /at6c_ops62s.txt#L57" idioL57" class="line" namtioL57">26a83./a>t<6a href="Documenta"
	 /at6c_ops6txt#L1Sai cdnioL116way,l_e" namtdec_">2_#L2k()=L69" The read anyam#L71" idioL71" class="line" namtioL71">26a thent21#L98" idioL98" class="line" namtioL98">26mp_a);tt26 2 tois also mee"s to>2 s="lss="laseiwhe45">2thcae" na#L71" idioL71" class="line" namtioL71">26 cal_t.t<6href="Documenta"
	 /atom6c_ops63xt#L1icomp
ldrtipll t9blzero,othe45"a45"nol"line" ardnall e likely to manufacture this addi"
	 al 6 4al_t.t<6href="Documenta"
	 /atom6c_ops63s.txtr#L88 t claseen declared vola"
le.  This is now disco6c53./a>t<6href="Documenta"
	 /atom6c_ops635t#L1





les origoL14 LXR softwa45"by3" c=n declarehttp://sourclL14ge.net/proj>Tha/lxr">LXR communityt#L1, the oexperila"
llbvoL/ in=by3n declaremailto:lxr@entux.no">lxr@entux.not#L1.


lxr.entux.no kindlyohosaebhat n declarehttp://www. tbp>ba-entpro.no">Rtbp>ba Lntpro ASt#L1, nein   rlof#Lntux=dinsultll t2 d atomic ind services since 1995.