Changeset 244 for soft/giet_vm/libs/spin_lock.c
- Timestamp:
- Jun 6, 2013, 5:39:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/spin_lock.c
r228 r244 32 32 33 33 asm volatile ( 34 "giet_lock_try: \n" 35 "ll $2, 0(%0) \n" /* $2 <= lock current value */ 34 "move $16, %0 \n" 35 "giet_lock_try : \n" 36 "ll $2, 0($16) \n" /* $2 <= lock current value */ 36 37 "bnez $2, giet_lock_delay \n" /* retry if lock already taken */ 37 38 "li $3, 1 \n" /* $3 <= argument for sc */ 38 "sc $3, 0( %0)\n" /* try to get lock */39 "sc $3, 0($16) \n" /* try to get lock */ 39 40 "bnez $3, giet_lock_ok \n" /* exit if atomic */ 40 41 … … 53 54 : 54 55 :"r"(plock) 55 :"$2", "$3", "$4" );56 :"$2", "$3", "$4", "$16"); 56 57 } 57 58
Note: See TracChangeset
for help on using the changeset viewer.