Subversion Repositories HelenOS

Rev

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

Rev 1888 Rev 1890
Line 54... Line 54...
54
    do {
54
    do {
55
        volatile uintptr_t x = (uint64_t) &val->count;
55
        volatile uintptr_t x = (uint64_t) &val->count;
56
 
56
 
57
        a = *((uint64_t *) x);
57
        a = *((uint64_t *) x);
58
        b = a + i;
58
        b = a + i;
59
        __asm__ volatile ("casx %0, %1, %2\n": "+m" (*((uint64_t *)x)), "+r" (a), "+r" (b));
59
        __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a));
60
    } while (a != b);
60
    } while (a != b);
61
 
61
 
62
    return a;
62
    return a;
63
}
63
}
64
 
64