Index: modules/portlib/src/main/native/thread/windows/thrspinlock.asm =================================================================== --- modules/portlib/src/main/native/thread/windows/thrspinlock.asm (revision 507827) +++ modules/portlib/src/main/native/thread/windows/thrspinlock.asm (working copy) @@ -1,122 +0,0 @@ -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. -; The ASF licenses this file to You under the Apache License, Version 2.0 -; (the "License"); you may not use this file except in compliance with -; the License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - .586p - assume cs:flat,ds:flat,ss:flat - .xmm -eq_HyThreadAbstractMonitor_spinCount1 equ 48 -eq_HyThreadAbstractMonitor_spinCount2 equ 52 -eq_HyThreadAbstractMonitor_spinCount3 equ 56 -eq_HyThreadAbstractMonitor_spinlockState equ 40 -eq_pointer_size equ 4 -eqS_hythread_spinlock_acquire equ 18 -eqS_hythread_spinlock_swapState equ 16 -eqSR_hythread_spinlock_acquire equ 3 -eqSR_hythread_spinlock_swapState equ 2 -eqSRS_hythread_spinlock_acquire equ 12 -eqSRS_hythread_spinlock_swapState equ 8 -eqSS_hythread_spinlock_acquire equ 72 -eqSS_hythread_spinlock_swapState equ 64 -HYTHREAD_MONITOR_SPINLOCK_OWNED equ 1 -HYTHREAD_MONITOR_SPINLOCK_UNOWNED equ 0 - CONST SEGMENT DWORD USE32 PUBLIC 'CONST' - CONST ends - _TEXT SEGMENT PARA USE32 PUBLIC 'CODE' - extrn hythread_yield:near - public hythread_spinlock_acquire - public hythread_spinlock_swapState -; Prototype: IDATA hythread_spinlock_acquire(hythread_t self, hythread_monitor_t monitor); -; Defined in: #THREAD Args: 2 - align 16 -hythread_spinlock_acquire PROC NEAR - ; localStackUse = 18 - push EBP - mov EBP,ESP - push EBX - push ESI - sub ESP,72 - mov EDX,dword ptr (eqSS_hythread_spinlock_acquire+0+eqSRS_hythread_spinlock_acquire+8)[ESP] - mov ECX,dword ptr eq_HyThreadAbstractMonitor_spinCount3[EDX] -L2: - mov EBX,dword ptr eq_HyThreadAbstractMonitor_spinCount2[EDX] -L3: -; Try to cmpxchg 0 into the target field (-1 indicates free) - cmp dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],HYTHREAD_MONITOR_SPINLOCK_UNOWNED ; setFlags: true - jne short L10 - xor EAX,EAX - mov ESI,HYTHREAD_MONITOR_SPINLOCK_OWNED -lockFixup12: -CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' - dd offset flat:lockFixup12 -CONST$_LOCKFIXUPS_B ends - lock cmpxchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],ESI - test EAX,EAX ; setFlags: true - jnz short L10 - xor EBX,EBX - jmp short L1 -L10: - dw 37107 ; PAUSE -; begin tight loop - mov EAX,dword ptr eq_HyThreadAbstractMonitor_spinCount1[EDX] -L11: -; inside tight loop - dec EAX ; setFlags: true(Converted subtract 1 to dec) - jnz short L11 -; end tight loop - dec EBX ; setFlags: true(Converted subtract 1 to dec) - jnz short L3 - mov dword ptr 64[ESP],ECX ; save VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3) - mov dword ptr 68[ESP],EDX ; save VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire - call hythread_yield - mov ECX,dword ptr 64[ESP] ; load VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3) - dec ECX ; setFlags: true(Converted subtract 1 to dec) - mov EDX,dword ptr 68[ESP] ; load VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire - jnz short L2 - mov EBX,-1 -L1: - mov EAX,EBX - add ESP,72 - pop ESI - pop EBX - pop EBP - ret -hythread_spinlock_acquire ENDP -; Prototype: UDATA hythread_spinlock_swapState(hythread_monitor_t monitor, UDATA newState); -; Defined in: #THREAD Args: 2 - align 16 -hythread_spinlock_swapState PROC NEAR - ; localStackUse = 16 - push EBP - mov EBP,ESP - push EBX - sub ESP,64 - mov EBX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+4)[ESP] - mov ECX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+8)[ESP] -; If we are writing in UNOWNED, we are exiting the critical section, therefore -; have to finish up any writes - test ECX,ECX ; setFlags: true - ; memory barrier (no code necessary for write barriers) - xchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EBX],ECX -; if we entered the critical section, (i.e. we swapped out UNOWNED) then -; we have to issue a readBarrier - test ECX,ECX ; setFlags: true - mov EAX,ECX - add ESP,64 - pop EBX - pop EBP - ret -hythread_spinlock_swapState ENDP - _TEXT ends - end Index: modules/portlib/src/main/native/thread/windows/thrhelp.asm =================================================================== --- modules/portlib/src/main/native/thread/windows/thrhelp.asm (revision 507827) +++ modules/portlib/src/main/native/thread/windows/thrhelp.asm (working copy) @@ -1,106 +0,0 @@ -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. -; The ASF licenses this file to You under the Apache License, Version 2.0 -; (the "License"); you may not use this file except in compliance with -; the License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - - .586p - assume cs:flat,ds:flat,ss:flat - .xmm -eq_hy_null equ 0 -eq_HyThreadMonitor_pinCount equ 28 -eq_pointer_size equ 4 -eqS_current_stack_depth equ 16 -eqS_hythread_monitor_pin equ 16 -eqS_hythread_monitor_unpin equ 16 -eqSR_current_stack_depth equ 2 -eqSR_hythread_monitor_pin equ 2 -eqSR_hythread_monitor_unpin equ 2 -eqSRS_current_stack_depth equ 8 -eqSRS_hythread_monitor_pin equ 8 -eqSRS_hythread_monitor_unpin equ 8 -eqSS_current_stack_depth equ 64 -eqSS_hythread_monitor_pin equ 64 -eqSS_hythread_monitor_unpin equ 64 - CONST SEGMENT DWORD USE32 PUBLIC 'CONST' - CONST ends - _TEXT SEGMENT PARA USE32 PUBLIC 'CODE' - public hythread_monitor_pin - public current_stack_depth - public hythread_monitor_unpin - align 16 -current_stack_depth PROC NEAR - ; localStackUse = 16 - push EBP - mov EBP,ESP - push EBX - sub ESP,64 - mov EBX,EBP - jmp short L2 -L1: - mov EBX,ECX -L2: - mov ECX,dword ptr [EBX] - test ECX,ECX ; setFlags: true - jnz short L1 - sub EBX,EBP - mov ECX,EBX - mov EAX,EBX ; RegReg opt - add ESP,64 - pop EBX - pop EBP - ret -current_stack_depth ENDP -; Prototype: void hythread_monitor_pin( hythread_monitor_t monitor, hythread_t osThread); -; Defined in: #THREAD Args: 2 - align 16 -hythread_monitor_pin PROC NEAR - ; localStackUse = 16 - push EBP - mov EBP,ESP - push EBX - sub ESP,64 - mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+8+eqSS_hythread_monitor_pin)[ESP] - mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+4+eqSS_hythread_monitor_pin)[ESP] -lockFixup3: -CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' - dd offset flat:lockFixup3 -CONST$_LOCKFIXUPS_B ends - lock inc dword ptr eq_HyThreadMonitor_pinCount[EBX] ; (Converted add 1 to inc) - add ESP,64 - pop EBX - pop EBP - ret -hythread_monitor_pin ENDP -; Prototype: void hythread_monitor_unpin( hythread_monitor_t monitor, hythread_t osThread); -; Defined in: #THREAD Args: 2 - align 16 -hythread_monitor_unpin PROC NEAR - ; localStackUse = 16 - push EBP - mov EBP,ESP - push EBX - sub ESP,64 - mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+8+eqSRS_hythread_monitor_unpin)[ESP] - mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+eqSRS_hythread_monitor_unpin+4)[ESP] -lockFixup4: -CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' - dd offset flat:lockFixup4 -CONST$_LOCKFIXUPS_B ends - lock dec dword ptr eq_HyThreadMonitor_pinCount[EBX] ; (Converted subtract 1 to dec) - add ESP,64 - pop EBX - pop EBP - ret -hythread_monitor_unpin ENDP - _TEXT ends - end Index: modules/portlib/src/main/native/thread/windows/windows.x86_64/thrspinlock.c =================================================================== --- modules/portlib/src/main/native/thread/windows/windows.x86_64/thrspinlock.c (revision 0) +++ modules/portlib/src/main/native/thread/windows/windows.x86_64/thrspinlock.c (revision 0) @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file + * @ingroup Thread + */ + +#include +#include +#include "hycomp.h" +#include "hythread.h" +#include "hymutex.h" + +UDATA hythread_spinlock_swapState(hythread_monitor_t monitor, UDATA newState) { + // TODO: need implementation + return (UDATA)0; +} + +IDATA hythread_spinlock_acquire(hythread_t self, hythread_monitor_t monitor) { + // TODO: need implementation + return (IDATA)0; +} + + Index: modules/portlib/src/main/native/thread/windows/windows.x86_64/thrhelp.c =================================================================== --- modules/portlib/src/main/native/thread/windows/windows.x86_64/thrhelp.c (revision 0) +++ modules/portlib/src/main/native/thread/windows/windows.x86_64/thrhelp.c (revision 0) @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @file + * @ingroup Thread + */ + +#include +#include +#include "hycomp.h" +#include "hythread.h" +#include "hymutex.h" + +void hythread_monitor_pin( hythread_monitor_t monitor, hythread_t osThread) { + // TODO: need implementation +} + +void hythread_monitor_unpin( hythread_monitor_t monitor, hythread_t osThread) { + // TODO: need implementation +} + Index: modules/portlib/src/main/native/thread/windows/makefile =================================================================== --- modules/portlib/src/main/native/thread/windows/makefile (revision 507827) +++ modules/portlib/src/main/native/thread/windows/makefile (working copy) @@ -24,8 +24,8 @@ LIBNAME=$(LIBPATH)$(LIBBASE).lib BUILDFILES = \ - $(SHAREDSUB)thread_copyright.obj thrhelp.obj thrspinlock.obj $(SHAREDSUB)hythread.obj \ - $(SHAREDSUB)hythreadinspect.obj $(SHAREDSUB)rwmutex.obj thrdsup.obj \ + $(SHAREDSUB)thread_copyright.obj $(HY_PLATFORM)\thrhelp.obj $(HY_PLATFORM)/thrspinlock.obj \ + $(SHAREDSUB)hythread.obj $(SHAREDSUB)hythreadinspect.obj $(SHAREDSUB)rwmutex.obj thrdsup.obj \ $(SHAREDSUB)thrprof.obj # TOFIX $(LIBBASE).def should be a dependency on all libs Index: modules/portlib/src/main/native/thread/windows/windows.x86/thrspinlock.asm =================================================================== --- modules/portlib/src/main/native/thread/windows/windows.x86/thrspinlock.asm (revision 0) +++ modules/portlib/src/main/native/thread/windows/windows.x86/thrspinlock.asm (revision 0) @@ -0,0 +1,122 @@ +; Licensed to the Apache Software Foundation (ASF) under one or more +; contributor license agreements. See the NOTICE file distributed with +; this work for additional information regarding copyright ownership. +; The ASF licenses this file to You under the Apache License, Version 2.0 +; (the "License"); you may not use this file except in compliance with +; the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + + .586p + assume cs:flat,ds:flat,ss:flat + .xmm +eq_HyThreadAbstractMonitor_spinCount1 equ 48 +eq_HyThreadAbstractMonitor_spinCount2 equ 52 +eq_HyThreadAbstractMonitor_spinCount3 equ 56 +eq_HyThreadAbstractMonitor_spinlockState equ 40 +eq_pointer_size equ 4 +eqS_hythread_spinlock_acquire equ 18 +eqS_hythread_spinlock_swapState equ 16 +eqSR_hythread_spinlock_acquire equ 3 +eqSR_hythread_spinlock_swapState equ 2 +eqSRS_hythread_spinlock_acquire equ 12 +eqSRS_hythread_spinlock_swapState equ 8 +eqSS_hythread_spinlock_acquire equ 72 +eqSS_hythread_spinlock_swapState equ 64 +HYTHREAD_MONITOR_SPINLOCK_OWNED equ 1 +HYTHREAD_MONITOR_SPINLOCK_UNOWNED equ 0 + CONST SEGMENT DWORD USE32 PUBLIC 'CONST' + CONST ends + _TEXT SEGMENT PARA USE32 PUBLIC 'CODE' + extrn hythread_yield:near + public hythread_spinlock_acquire + public hythread_spinlock_swapState +; Prototype: IDATA hythread_spinlock_acquire(hythread_t self, hythread_monitor_t monitor); +; Defined in: #THREAD Args: 2 + align 16 +hythread_spinlock_acquire PROC NEAR + ; localStackUse = 18 + push EBP + mov EBP,ESP + push EBX + push ESI + sub ESP,72 + mov EDX,dword ptr (eqSS_hythread_spinlock_acquire+0+eqSRS_hythread_spinlock_acquire+8)[ESP] + mov ECX,dword ptr eq_HyThreadAbstractMonitor_spinCount3[EDX] +L2: + mov EBX,dword ptr eq_HyThreadAbstractMonitor_spinCount2[EDX] +L3: +; Try to cmpxchg 0 into the target field (-1 indicates free) + cmp dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],HYTHREAD_MONITOR_SPINLOCK_UNOWNED ; setFlags: true + jne short L10 + xor EAX,EAX + mov ESI,HYTHREAD_MONITOR_SPINLOCK_OWNED +lockFixup12: +CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' + dd offset flat:lockFixup12 +CONST$_LOCKFIXUPS_B ends + lock cmpxchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],ESI + test EAX,EAX ; setFlags: true + jnz short L10 + xor EBX,EBX + jmp short L1 +L10: + dw 37107 ; PAUSE +; begin tight loop + mov EAX,dword ptr eq_HyThreadAbstractMonitor_spinCount1[EDX] +L11: +; inside tight loop + dec EAX ; setFlags: true(Converted subtract 1 to dec) + jnz short L11 +; end tight loop + dec EBX ; setFlags: true(Converted subtract 1 to dec) + jnz short L3 + mov dword ptr 64[ESP],ECX ; save VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3) + mov dword ptr 68[ESP],EDX ; save VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire + call hythread_yield + mov ECX,dword ptr 64[ESP] ; load VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3) + dec ECX ; setFlags: true(Converted subtract 1 to dec) + mov EDX,dword ptr 68[ESP] ; load VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire + jnz short L2 + mov EBX,-1 +L1: + mov EAX,EBX + add ESP,72 + pop ESI + pop EBX + pop EBP + ret +hythread_spinlock_acquire ENDP +; Prototype: UDATA hythread_spinlock_swapState(hythread_monitor_t monitor, UDATA newState); +; Defined in: #THREAD Args: 2 + align 16 +hythread_spinlock_swapState PROC NEAR + ; localStackUse = 16 + push EBP + mov EBP,ESP + push EBX + sub ESP,64 + mov EBX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+4)[ESP] + mov ECX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+8)[ESP] +; If we are writing in UNOWNED, we are exiting the critical section, therefore +; have to finish up any writes + test ECX,ECX ; setFlags: true + ; memory barrier (no code necessary for write barriers) + xchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EBX],ECX +; if we entered the critical section, (i.e. we swapped out UNOWNED) then +; we have to issue a readBarrier + test ECX,ECX ; setFlags: true + mov EAX,ECX + add ESP,64 + pop EBX + pop EBP + ret +hythread_spinlock_swapState ENDP + _TEXT ends + end Index: modules/portlib/src/main/native/thread/windows/windows.x86/thrhelp.asm =================================================================== --- modules/portlib/src/main/native/thread/windows/windows.x86/thrhelp.asm (revision 0) +++ modules/portlib/src/main/native/thread/windows/windows.x86/thrhelp.asm (revision 0) @@ -0,0 +1,106 @@ +; Licensed to the Apache Software Foundation (ASF) under one or more +; contributor license agreements. See the NOTICE file distributed with +; this work for additional information regarding copyright ownership. +; The ASF licenses this file to You under the Apache License, Version 2.0 +; (the "License"); you may not use this file except in compliance with +; the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + + .586p + assume cs:flat,ds:flat,ss:flat + .xmm +eq_hy_null equ 0 +eq_HyThreadMonitor_pinCount equ 28 +eq_pointer_size equ 4 +eqS_current_stack_depth equ 16 +eqS_hythread_monitor_pin equ 16 +eqS_hythread_monitor_unpin equ 16 +eqSR_current_stack_depth equ 2 +eqSR_hythread_monitor_pin equ 2 +eqSR_hythread_monitor_unpin equ 2 +eqSRS_current_stack_depth equ 8 +eqSRS_hythread_monitor_pin equ 8 +eqSRS_hythread_monitor_unpin equ 8 +eqSS_current_stack_depth equ 64 +eqSS_hythread_monitor_pin equ 64 +eqSS_hythread_monitor_unpin equ 64 + CONST SEGMENT DWORD USE32 PUBLIC 'CONST' + CONST ends + _TEXT SEGMENT PARA USE32 PUBLIC 'CODE' + public hythread_monitor_pin + public current_stack_depth + public hythread_monitor_unpin + align 16 +current_stack_depth PROC NEAR + ; localStackUse = 16 + push EBP + mov EBP,ESP + push EBX + sub ESP,64 + mov EBX,EBP + jmp short L2 +L1: + mov EBX,ECX +L2: + mov ECX,dword ptr [EBX] + test ECX,ECX ; setFlags: true + jnz short L1 + sub EBX,EBP + mov ECX,EBX + mov EAX,EBX ; RegReg opt + add ESP,64 + pop EBX + pop EBP + ret +current_stack_depth ENDP +; Prototype: void hythread_monitor_pin( hythread_monitor_t monitor, hythread_t osThread); +; Defined in: #THREAD Args: 2 + align 16 +hythread_monitor_pin PROC NEAR + ; localStackUse = 16 + push EBP + mov EBP,ESP + push EBX + sub ESP,64 + mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+8+eqSS_hythread_monitor_pin)[ESP] + mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+4+eqSS_hythread_monitor_pin)[ESP] +lockFixup3: +CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' + dd offset flat:lockFixup3 +CONST$_LOCKFIXUPS_B ends + lock inc dword ptr eq_HyThreadMonitor_pinCount[EBX] ; (Converted add 1 to inc) + add ESP,64 + pop EBX + pop EBP + ret +hythread_monitor_pin ENDP +; Prototype: void hythread_monitor_unpin( hythread_monitor_t monitor, hythread_t osThread); +; Defined in: #THREAD Args: 2 + align 16 +hythread_monitor_unpin PROC NEAR + ; localStackUse = 16 + push EBP + mov EBP,ESP + push EBX + sub ESP,64 + mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+8+eqSRS_hythread_monitor_unpin)[ESP] + mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+eqSRS_hythread_monitor_unpin+4)[ESP] +lockFixup4: +CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST' + dd offset flat:lockFixup4 +CONST$_LOCKFIXUPS_B ends + lock dec dword ptr eq_HyThreadMonitor_pinCount[EBX] ; (Converted subtract 1 to dec) + add ESP,64 + pop EBX + pop EBP + ret +hythread_monitor_unpin ENDP + _TEXT ends + end Index: modules/portlib/src/main/native/common/windows/locklbl.asm =================================================================== --- modules/portlib/src/main/native/common/windows/locklbl.asm (revision 507827) +++ modules/portlib/src/main/native/common/windows/locklbl.asm (working copy) @@ -1,30 +0,0 @@ -; Licensed to the Apache Software Foundation (ASF) under one or more -; contributor license agreements. See the NOTICE file distributed with -; this work for additional information regarding copyright ownership. -; The ASF licenses this file to You under the Apache License, Version 2.0 -; (the "License"); you may not use this file except in compliance with -; the License. You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; Unless required by applicable law or agreed to in writing, software -; distributed under the License is distributed on an "AS IS" BASIS, -; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -; See the License for the specific language governing permissions and -; limitations under the License. - -.386p -assume cs:flat,ds:flat,ss:flat - -public lockFixupEnd -public lockFixupBegin - -CONST$_LOCKFIXUPS_A SEGMENT DWORD USE32 PUBLIC 'CONST' -lockFixupBegin: -CONST$_LOCKFIXUPS_A ends - -CONST$_LOCKFIXUPS_Z SEGMENT DWORD USE32 PUBLIC 'CONST' -lockFixupEnd: -CONST$_LOCKFIXUPS_Z ends - -end Index: modules/portlib/src/main/native/common/windows/windows.x86_64/locklbl.asm =================================================================== --- modules/portlib/src/main/native/common/windows/windows.x86_64/locklbl.asm (revision 0) +++ modules/portlib/src/main/native/common/windows/windows.x86_64/locklbl.asm (revision 0) @@ -0,0 +1,30 @@ +; Licensed to the Apache Software Foundation (ASF) under one or more +; contributor license agreements. See the NOTICE file distributed with +; this work for additional information regarding copyright ownership. +; The ASF licenses this file to You under the Apache License, Version 2.0 +; (the "License"); you may not use this file except in compliance with +; the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + +; .386p +; assume cs:flat,ds:flat,ss:flat + +public lockFixupEnd +public lockFixupBegin + +CONST$_LOCKFIXUPS_A SEGMENT +lockFixupBegin: +CONST$_LOCKFIXUPS_A ends + +CONST$_LOCKFIXUPS_Z SEGMENT +lockFixupEnd: +CONST$_LOCKFIXUPS_Z ends + +end Index: modules/portlib/src/main/native/common/windows/makefile =================================================================== --- modules/portlib/src/main/native/common/windows/makefile (revision 507827) +++ modules/portlib/src/main/native/common/windows/makefile (working copy) @@ -24,7 +24,7 @@ BUILDFILES = \ $(SHAREDSUB)libglob.obj $(SHAREDSUB)iohelp.obj \ $(SHAREDSUB)exceptions.obj $(SHAREDSUB)strhelp.obj \ - locklbl.obj lock386.obj \ + $(HY_PLATFORM)\locklbl.obj lock386.obj \ $(SHAREDSUB)utf8decode.obj $(SHAREDSUB)utf8encode.obj MDLLIBFILES = Index: modules/portlib/src/main/native/common/windows/windows.x86/locklbl.asm =================================================================== --- modules/portlib/src/main/native/common/windows/windows.x86/locklbl.asm (revision 0) +++ modules/portlib/src/main/native/common/windows/windows.x86/locklbl.asm (revision 0) @@ -0,0 +1,30 @@ +; Licensed to the Apache Software Foundation (ASF) under one or more +; contributor license agreements. See the NOTICE file distributed with +; this work for additional information regarding copyright ownership. +; The ASF licenses this file to You under the Apache License, Version 2.0 +; (the "License"); you may not use this file except in compliance with +; the License. You may obtain a copy of the License at +; +; http://www.apache.org/licenses/LICENSE-2.0 +; +; Unless required by applicable law or agreed to in writing, software +; distributed under the License is distributed on an "AS IS" BASIS, +; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +; See the License for the specific language governing permissions and +; limitations under the License. + +.386p +assume cs:flat,ds:flat,ss:flat + +public lockFixupEnd +public lockFixupBegin + +CONST$_LOCKFIXUPS_A SEGMENT DWORD USE32 PUBLIC 'CONST' +lockFixupBegin: +CONST$_LOCKFIXUPS_A ends + +CONST$_LOCKFIXUPS_Z SEGMENT DWORD USE32 PUBLIC 'CONST' +lockFixupEnd: +CONST$_LOCKFIXUPS_Z ends + +end