Changeset 25567 in vbox
- Timestamp:
- Dec 22, 2009 2:21:39 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/common/misc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp
r25552 r25567 1066 1066 case RTTHREADSTATE_FAST_MUTEX: 1067 1067 case RTTHREADSTATE_MUTEX: 1068 case RTTHREADSTATE_RW_READ:1069 1068 case RTTHREADSTATE_RW_WRITE: 1070 1069 case RTTHREADSTATE_SPIN_MUTEX: … … 1083 1082 } 1084 1083 1084 case RTTHREADSTATE_RW_READ: 1085 { 1086 PRTLOCKVALIDATORREC pCurRec = pCur->LockValidator.pRec; 1087 if ( rtThreadGetState(pCur) != enmCurState 1088 || !VALID_PTR(pCurRec) 1089 || pCurRec->u32Magic != RTLOCKVALIDATORREC_MAGIC) 1090 continue; 1091 pNext = pCurRec->hThread; 1092 if ( rtThreadGetState(pCur) != enmCurState 1093 || pCurRec->u32Magic != RTLOCKVALIDATORREC_MAGIC 1094 || pCurRec->hThread != pNext) 1095 continue; 1096 break; 1097 } 1098 1099 1085 1100 default: 1086 1101 pNext = NULL; -
trunk/src/VBox/Runtime/common/misc/setjmp.asm
r25565 r25567 5 5 6 6 ; 7 ; Copyright (C) 2006-200 7Sun Microsystems, Inc.7 ; Copyright (C) 2006-2009 Sun Microsystems, Inc. 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 36 36 37 ;; 38 ; @param x86:[esp+4] msc:rcx gcc:rdi The jump buffer pointer. 37 39 BEGINPROC RT_NOCRT(setjmp) 38 40 %ifdef RT_ARCH_AMD64 39 %if def ASM_CALL64_MSC40 %error "port me"41 %ifndef ASM_CALL64_MSC 42 mov rcx, rdi 41 43 %endif 42 44 mov rax, [rsp] 43 mov [rdi + 00h], rax ; rip 44 lea rcx, [rsp + 8] 45 mov [rdi + 08h], rcx ; rsp 46 mov [rdi + 10h], rbp 47 mov [rdi + 18h], r15 48 mov [rdi + 20h], r14 49 mov [rdi + 28h], r13 50 mov [rdi + 30h], r12 51 mov [rdi + 38h], rbx 52 ;; @todo Must save XMM registers ... can ignore in RC/R0? 45 mov [rcx + 0h*8], rax ; 0 - rip 46 lea rdx, [rsp + 8] 47 mov [rcx + 1h*8], rdx ; 1 - rsp 48 mov [rcx + 2h*8], rbp 49 mov [rcx + 3h*8], r15 50 mov [rcx + 4h*8], r14 51 mov [rcx + 5h*8], r13 52 mov [rcx + 6h*8], r12 53 mov [rcx + 7h*8], rbx 54 %ifdef ASM_CALL64_MSC 55 mov [rcx + 8h*8], rsi 56 mov [rcx + 9h*8], rdi 57 movdaq [rcx + 0ah*8], xmm6 58 movdaq [rcx + 0ch*8], xmm7 59 movdaq [rcx + 0eh*8], xmm8 60 movdaq [rcx + 10h*8], xmm9 61 movdaq [rcx + 12h*8], xmm10 62 movdaq [rcx + 14h*8], xmm11 63 movdaq [rcx + 16h*8], xmm12 64 movdaq [rcx + 18h*8], xmm13 65 movdaq [rcx + 1ah*8], xmm14 66 movdaq [rcx + 1ch*8], xmm15 67 %ifndef RT_OS_WINDOWS 68 %error "Fix setjmp.h" 69 %endif 70 %endif 53 71 %else 54 72 mov edx, [esp + 4h] 55 73 mov eax, [esp] 56 mov [edx + 0 0h], eax; eip74 mov [edx + 0h*4], eax ; eip 57 75 lea ecx, [esp + 4h] 58 mov [edx + 04h], ecx; esp59 mov [edx + 08h], ebp60 mov [edx + 0ch], ebx61 mov [edx + 10h], edi62 mov [edx + 14h], esi76 mov [edx + 1h*4], ecx ; esp 77 mov [edx + 2h*4], ebp 78 mov [edx + 3h*4], ebx 79 mov [edx + 4h*4], edi 80 mov [edx + 5h*4], esi 63 81 %endif 64 82 xor eax, eax … … 67 85 68 86 87 ;; 88 ; @param x86:[esp+4] msc:rcx gcc:rdi The jump buffer pointer. 89 ; @param x86:[esp+8] msc:rdx gcc:rsi Return value. 69 90 BEGINPROC RT_NOCRT(longjmp) 70 91 %ifdef RT_ARCH_AMD64 71 92 %ifdef ASM_CALL64_MSC 72 %error "port me" 93 mov eax, edx ; ret 94 %else 95 mov rcx, rdi ; jmp_buf 96 mov eax, esi ; ret 73 97 %endif 74 mov rbx, [rdi + 38h] 75 mov r12, [rdi + 30h] 76 mov r13, [rdi + 28h] 77 mov r14, [rdi + 20h] 78 mov r15, [rdi + 18h] 79 mov rbp, [rdi + 10h] 80 mov eax, esi 98 mov rbp, [rcx + 2h*8] 99 mov r15, [rcx + 3h*8] 100 mov r14, [rcx + 4h*8] 101 mov r13, [rcx + 5h*8] 102 mov r12, [rcx + 6h*8] 103 mov rbx, [rcx + 7h*8] 104 %ifdef ASM_CALL64_MSC 105 mov rsi, [rcx + 8h*8] 106 mov rdi, [rcx + 9h*8] 107 movdaq xmm6, [rcx + 0ah*8] 108 movdaq xmm7, [rcx + 0ch*8] 109 movdaq xmm8, [rcx + 0eh*8] 110 movdaq xmm9, [rcx + 10h*8] 111 movdaq xmm10, [rcx + 12h*8] 112 movdaq xmm11, [rcx + 14h*8] 113 movdaq xmm12, [rcx + 16h*8] 114 movdaq xmm13, [rcx + 18h*8] 115 movdaq xmm14, [rcx + 1ah*8] 116 movdaq xmm15, [rcx + 1ch*8] 117 %ifndef RT_OS_WINDOWS 118 %error "Fix setjmp.h" 119 %endif 120 %endif 81 121 test eax, eax 82 122 jnz .fine 83 123 inc al 84 124 .fine: 85 mov rsp, [rdi + 08h]86 jmp qword [rdi + 00h]125 mov rsp, [rcx + 1h*8] 126 jmp qword [rcx + 0h*8] 87 127 %else 88 mov edx, [esp + 4h] 89 mov eax, [esp + 8h] 90 mov esi, [edx + 14h]91 mov edi, [edx + 10h]92 mov ebx, [edx + 0ch]93 mov ebp, [edx + 08h]128 mov edx, [esp + 4h] ; jmp_buf 129 mov eax, [esp + 8h] ; ret 130 mov esi, [edx + 5h*4] 131 mov edi, [edx + 4h*4] 132 mov ebx, [edx + 3h*4] 133 mov ebp, [edx + 2h*4] 94 134 test eax, eax 95 135 jnz .fine 96 136 inc al 97 137 .fine: 98 mov esp, [edx + 04h]99 jmp dword [edx + 00h]138 mov esp, [edx + 1h*4] 139 jmp dword [edx+ 0h*4] 100 140 %endif 101 141 ENDPROC RT_NOCRT(longjmp)
Note:
See TracChangeset
for help on using the changeset viewer.