Subversion Repositories HelenOS

Rev

Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2082
Line 54... Line 54...
54
 */
54
 */
55
static inline long atomic_add(atomic_t *val, int i)
55
static inline long atomic_add(atomic_t *val, int i)
56
{
56
{
57
    long tmp, v;
57
    long tmp, v;
58
 
58
 
59
    __asm__ volatile (
59
    asm volatile (
60
        "1:\n"
60
        "1:\n"
61
        "   ll %0, %1\n"
61
        "   ll %0, %1\n"
62
        "   addiu %0, %0, %3\n" /* same as addi, but never traps on overflow */
62
        "   addiu %0, %0, %3\n" /* same as addi, but never traps on overflow */
63
        "       move %2, %0\n"
63
        "       move %2, %0\n"
64
        "   sc %0, %1\n"
64
        "   sc %0, %1\n"