Changeset 1433ecda in mainline for uspace/lib/c/arch/mips32/include
- Timestamp:
- 2018-04-04T15:42:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips32/include/libarch/atomic.h
r47b2d7e3 r1433ecda 64 64 65 65 asm volatile ( 66 67 68 69 70 71 72 73 74 75 76 77 66 "1:\n" 67 " ll %0, %1\n" 68 " addu %0, %0, %3\n" /* same as add, but never traps on overflow */ 69 " move %2, %0\n" 70 " sc %0, %1\n" 71 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ 72 " nop\n" 73 : "=&r" (tmp), 74 "+m" (val->count), 75 "=&r" (v) 76 : "r" (i), 77 "i" (0) 78 78 ); 79 79
Note:
See TracChangeset
for help on using the changeset viewer.