Ignore:
Timestamp:
2009-01-13T20:26:00Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6cd3e8a
Parents:
42ec919
Message:

Fix mips32 userspace atomic_add() the same way as the kernel one. This problem prevented building at lower optimization levels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/mips32/include/atomic.h

    r42ec919 rbda24ee7  
    6060                "1:\n"
    6161                "       ll %0, %1\n"
    62                 "       addiu %0, %0, %3\n"     /* same as addi, but never traps on overflow */
     62                "       addu %0, %0, %3\n"      /* same as add, but never traps on overflow */
    6363                "       move %2, %0\n"
    6464                "       sc %0, %1\n"
    6565                "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    6666                /*      nop     */              /* nop is inserted automatically by compiler */
     67                "       nop\n"
    6768                : "=&r" (tmp), "+m" (val->count), "=&r" (v)
    68                 : "i" (i), "i" (0)
     69                : "r" (i), "i" (0)
    6970                );
    7071
Note: See TracChangeset for help on using the changeset viewer.