<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Compare-and-swap - Page 1 - Wikipedia">
<p>
<a accesskey="3" href="page.php?w=compare-and-swap&amp;p=2">3.Next</a>
</p>
<p>In <a href="page.php?w=computer_science">computer science</a>, <b>compare-and-swap</b> (<b>CAS</b>) is an <a href="page.php?w=atomic_%28computer_science%29">atomic</a> <a href="page.php?w=instruction_%28computer_science%29">instruction</a> used in <a href="page.php?w=thread_%28computer_science%29">multithreading</a> to achieve synchronization. It compares the contents of a <a href="page.php?w=memory_location">memory location</a> with a given (the previous) value and, only if they are the same, modifies the contents of that memory location to</p><p>
<a accesskey="3" href="page.php?w=compare-and-swap&amp;p=2">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
