Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2082
Line 53... Line 53...
53
 */
53
 */
54
static inline long atomic_add(atomic_t *val, int i)
54
static inline long atomic_add(atomic_t *val, int i)
55
{
55
{
56
    long tmp, v;
56
    long tmp, v;
57
 
57
 
58
    __asm__ volatile (
58
    asm volatile (
59
        "1:\n"
59
        "1:\n"
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"