• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/ppc/

Lines Matching refs:lock

99  *			Initialize a hardware lock.
106 li r0, 0 ; set lock to free == 0
107 stw r0, 0(r3) ; Initialize the lock
113 * Try to acquire spin-lock. The second parameter is the bit mask to test and set.
130 * Acquire lock, spinning until it becomes available.
132 * We will just set a default timeout and jump into the NORMAL timeout lock.
152 * Try to acquire spin-lock. Return success (1) or failure (0).
154 * We try fairly hard to get this lock. We disable for interruptions, but
158 * we return either in abject failure, or disable and go back to the lock sniff routine.
159 * If the sniffer finds the lock free, it jumps right up and tries to grab it.
172 mr r5,r3 ; Get the address of the lock
175 lcktry: lwarx r6,0,r5 ; Grab the lock value
179 stwcx. r6,0,r5 ; Try to seize that there durn lock
212 lcksniff: lwz r3,0(r5) ; Get that lock in here
239 lckfail: ; We couldn't get the lock
252 STRINGD "timeout on attempt to acquire lock (0x%08X), value = 0x%08X\n\000"
258 * Unconditionally release lock.
272 li r0, 0 ; set lock to free
280 * Release bit based spin-lock. The second parameter is the bit mask to clear.
295 ubittry: lwarx r0,0,r3 ; Grab the lock value
296 andc r0,r0,r4 ; Clear the lock bits
297 stwcx. r0,0,r3 ; Try to clear that there durn lock
306 * Try to acquire spin-lock. The second parameter is the bit mask to check.
310 * We try fairly hard to get this lock. We disable for interruptions, but
314 * we return either in abject failure, or disable and go back to the lock sniff routine.
315 * If the sniffer finds the lock free, it jumps right up and tries to grab it.
324 mbittry: lwarx r12,0,r3 ; Grab the lock value
327 or r12,r12,r6 ; Turn on the lock bits
330 stwcx. r12,0,r3 ; Try to seize that there durn lock
354 lwz r12,0(r3) ; Get that lock in here
466 * Try to acquire spin-lock. Return success (1) or failure (0)
508 li r3,1 ; Set that the lock was free
517 li r3,0 ; FAILURE - lock was taken
523 * Return 1 if lock is held
532 isync ; Make sure we don't use a speculativily fetched lock
533 lwz r3, 0(r3) ; Get lock value
729 * Routines for mutex lock debugging.
733 * Gets lock check flags in CR6: CR bits 24-27
741 * Checks for expected lock type.
814 STRINGD "mutex (0x%08X) recursive lock attempt\n\000"
851 stw r10,MUTEX_DATA(r3) ; clear lock word
859 stw r9, MUTEX_TYPE(r3) ; set lock type
886 mr r11,r3 ; Save lock addr
905 STRINGD "mutex lock attempt with assert_wait_possible false\n\000"
918 lwz r5,MUTEX_GRP(r3) ; Load lock group
931 lwz r5,MUTEX_DATA(r3) ; Get the lock quickly
946 lwarx r5,MUTEX_DATA,r3 ; load the mutex lock
949 stwcx. r6,MUTEX_DATA,r3 ; grab the lock
993 lwz r5,MUTEX_DATA(r3) ; Get the lock quickly
994 mr r11,r3 ; Save lock addr
1002 lwarx r5,MUTEX_DATA,r3 ; load the mutex lock
1005 stwcx. r6,MUTEX_DATA,r3 ; grab the lock
1061 mlcksniff: lwz r5,MUTEX_DATA(r3) ; Get that lock in here
1062 mr. r5,r5 ; Is the lock held
1064 rlwinm. r10,r5,0,0,29 ; Extract the lock owner
1071 lwz r5,MUTEX_GRP(r3) ; Load lock group
1112 mlckslow0: ; We couldn't get the lock
1120 bl lockDisa ; Go get a lock on the mutex's interlock lock
1122 lwz r3,FM_ARG0(r1) ; Restore the lock address
1124 mr r4,r11 ; Saved lock addr
1128 BREAKPOINT_TRAP ; We die here anyway, can not get the lock
1132 STRINGD "attempt to interlock mutex (0x%08X) failed on mutex lock\n\000"
1138 ; hold the interlock lock and no one can touch this field unless they
1141 lwz r4,MUTEX_DATA(r3) ; Get the mutex's lock field
1155 mr r3,r11 ; Get the based lock address
1178 CHECK_MYLOCK() ; Assert we don't own the lock already */
1200 rlwinm r4,r4,0,0,29 ; Extract the lock owner
1203 mr r3,r11 ; Get the based lock address
1204 bl EXT(lck_mtx_lock_wait) ; Wait for our turn at the lock
1226 mr r11,r3 ; Save lock addr
1234 lwz r5,MUTEX_GRP(r3) ; Load lock group
1248 lwz r5,MUTEX_DATA(r3) ; Get the lock value
1261 lwarx r5,MUTEX_DATA,r3 ; load the lock value
1264 stwcx. r6,MUTEX_DATA,r3 ; grab the lock
1302 lwz r5,MUTEX_DATA(r3) ; Get the lock value
1303 mr r11,r3 ; Save lock addr
1308 lwarx r5,MUTEX_DATA,r3 ; load the lock value
1311 stwcx. r6,MUTEX_DATA,r3 ; grab the lock
1336 rlwinm. r6,r6,30,2,31 ; to see if someone has this lock already
1339 bl lockDisa ; Go get a lock on the mutex's interlock lock
1341 lwz r3,FM_ARG0(r1) ; Restore the lock address
1343 mr r4,r11 ; Saved lock addr
1347 BREAKPOINT_TRAP ; We die here anyway, can not get the lock
1351 STRINGD "attempt to interlock mutex (0x%08X) failed on mutex lock try\n\000"
1360 lwz r4,MUTEX_DATA(r3) ; Get the mutex's lock field
1374 mr r3,r11 ; Get the based lock address
1397 lwz r5,MUTEX_GRP(r3) ; Load lock group
1423 mr r11,r3 ; Save lock addr
1448 mr r11,r3 ; Save lock addr
1456 lwz r5,MUTEX_DATA(r3) ; Get the lock
1502 mr r11,r3 ; Save lock addr
1504 lwz r5,MUTEX_DATA(r3) ; Get the lock
1516 /* lock released - LS_LCK_MTX_UNLOCK_RELEASE */
1538 bl lockDisa ; Go get a lock on the mutex's interlock lock
1540 lwz r3,FM_ARG0(r1) ; Restore the lock address
1542 mr r4,r11 ; Saved lock addr
1546 BREAKPOINT_TRAP ; We die here anyway, can not get the lock
1560 mr r3,r11 ; Get the based lock address
1564 lwz r5,MUTEX_DATA(r3) ; load the lock
1569 stw r5,MUTEX_DATA(r3) ; unlock the interlock and lock
1592 rlwinm r5,r5,0,0,29 ; Extract the lock owner
1594 cmplw cr1,r6,r5 ; Is the lock held by current act
1622 * void lck_mtx_ilk_unlock(lck_mtx *lock)
1742 * Initialize a simple lock.
1749 li r0, 0 ; set lock to free == 0
1750 stw r0, 0(r3) ; Initialize the lock
1768 mr r5,r3 ; Get the address of the lock
1772 slcktry: lwarx r11,SLOCK_ILK,r5 ; Grab the lock value
1776 stwcx. r11,SLOCK_ILK,r5 ; Try to seize that there durn lock
1808 slcksniff: lwz r3,SLOCK_ILK(r5) ; Get that lock in here
1835 slckfail: ; We couldn't get the lock
1846 STRINGD "simple lock (0x%08X) deadlock detection, pc=0x%08X\n\000"
1869 lwz r11,SLOCK_ILK(r3) ; Get the lock
1892 li r3,1 ; Set that the lock was free
1901 li r3,0 ; FAILURE - lock was taken
1955 rwleloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
1959 stwcx. r6,RW_DATA,r3 ; Update lock word
1968 cmpli cr0,r5,RW_IND ; Is it a lock indirect
1970 mr r4,r3 ; pass lock pointer
1971 lwz r3,RW_PTR(r3) ; load lock ext pointer
1987 rwlsloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
1992 stwcx. r6,RW_DATA,r3 ; Update lock word
2007 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2009 mr r4,r3 ; pass lock pointer
2010 lwz r3,RW_PTR(r3) ; load lock ext pointer
2026 rwlseloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
2033 stwcx. r9,RW_DATA,r3 ; Update lock word
2043 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2045 mr r4,r3 ; pass lock pointer
2046 lwz r3,RW_PTR(r3) ; load lock ext pointer
2070 rwlesloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
2081 stwcx. r6,RW_DATA,r3 ; Update lock word
2085 addi r3,r3,RW_EVENT ; Get lock event address
2090 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2092 mr r4,r3 ; pass lock pointer
2093 lwz r3,RW_PTR(r3) ; load lock ext pointer
2109 rwtleloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
2115 stwcx. r6,RW_DATA,r3 ; Update lock word
2130 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2132 mr r4,r3 ; pass lock pointer
2133 lwz r3,RW_PTR(r3) ; load lock ext pointer
2146 rwtlsloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
2153 stwcx. r6,RW_DATA,r3 ; Update lock word
2172 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2174 mr r4,r3 ; pass lock pointer
2175 lwz r3,RW_PTR(r3) ; load lock ext pointer
2201 mr r12,r3 ; Save lock addr
2202 rwldloop: lwarx r5,RW_DATA,r3 ; Grab the lock value
2228 stwcx. r6,RW_DATA,r3 ; Update lock word
2231 mr r3,r11 ; Return lock held type
2233 mr r3,r12 ; Restore lock address
2235 addi r3,r3,RW_EVENT ; Get lock event address
2240 li r3,RW_SHARED ; Assume lock type shared
2242 li r3,RW_EXCL ; Return lock type exclusive
2248 cmpli cr0,r5,RW_IND ; Is it a lock indirect
2250 mr r4,r3 ; pass lock pointer
2251 lwz r3,RW_PTR(r3) ; load lock ext pointer
2257 * void lck_rw_ilk_lock(lck_rw_t *lock)
2267 * void lck_rw_ilk_unlock(lck_rw_t *lock)