Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1769
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
 /** @addtogroup mips32
29
/** @addtogroup mips32 
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
Line 60... Line 60...
60
        "   ll %0, %1\n"
60
        "   ll %0, %1\n"
61
        "   addiu %0, %0, %3\n" /* same as addi, but never traps on overflow */
61
        "   addiu %0, %0, %3\n" /* same as addi, but never traps on overflow */
62
        "       move %2, %0\n"
62
        "       move %2, %0\n"
63
        "   sc %0, %1\n"
63
        "   sc %0, %1\n"
64
        "   beq %0, %4, 1b\n"   /* if the atomic operation failed, try again */
64
        "   beq %0, %4, 1b\n"   /* if the atomic operation failed, try again */
65
        /*  nop */      /* nop is inserted automatically by compiler */
65
        "   nop\n"
66
        : "=r" (tmp), "=m" (val->count), "=r" (v)
66
        : "=r" (tmp), "=m" (val->count), "=r" (v)
67
        : "i" (i), "i" (0)
67
        : "i" (i), "i" (0)
68
        );
68
        );
69
 
69
 
70
    return v;
70
    return v;
71
}
71
}
72
 
72
 
73
#endif
73
#endif
74
 
74
 
75
 /** @}
75
/** @}
76
 */
76
 */
77
 
-