kernel/eka/nkernsmp/x86/ncutilf.cia
branchRCL_3
changeset 43 c1f20ce4abcf
parent 0 a41df078684a
child 44 3e88ff8f41d5
--- a/kernel/eka/nkernsmp/x86/ncutilf.cia	Thu Aug 19 11:14:22 2010 +0300
+++ b/kernel/eka/nkernsmp/x86/ncutilf.cia	Tue Aug 31 16:34:26 2010 +0300
@@ -74,8 +74,9 @@
 	asm("test cl, 3 ");
 	asm("jnz short use_tsc_only ");
 	asm("rdtsc ");
-	asm("add eax, [ecx+80+%0]" : : "i" _FOFF(TSubScheduler, iExtras));
-	asm("adc edx, [ecx+84+%0]" : : "i" _FOFF(TSubScheduler, iExtras));
+	asm("lea ecx, [ecx+%0]" : : "i" _FOFF(TSubScheduler, iSSX.iTimestampOffset));
+	asm("add eax, [ecx] ");
+	asm("adc edx, [ecx+4] ");
 	asm("popfd ");
 	asm("ret ");
 
@@ -133,7 +134,7 @@
 	asm("slec_preemption: ");
 	asm("cmp cl, 0xff ");
 	asm("je short slec_1 ");			/* EOrderNone - don't check interrupts or preemption */
-	asm("cmp dword ptr [edx+52+%0], 0" : : "i"_FOFF(TSubScheduler, iExtras));
+	asm("cmp dword ptr [edx+%0], 0" : : "i"_FOFF(TSubScheduler, iSSX.iIrqNestCount));
 	asm("jge short slec_preemption_die ");	/* If called from ISR, die */
 	asm("cmp dword ptr [edx+%0], 0" : : "i" _FOFF(TSubScheduler, iKernLockCount));
 	asm("jnz short slec_1 ");			/* Preemption disabled - OK */
@@ -484,7 +485,7 @@
 	asm("rwrlec_preemption: ");
 	asm("cmp cl, 0xff ");
 	asm("je short rwrlec_1 ");			/* EOrderNone - don't check interrupts or preemption */
-	asm("cmp dword ptr [edx+52+%0], 0" : : "i"_FOFF(TSubScheduler, iExtras));
+	asm("cmp dword ptr [edx+%0], 0" : : "i"_FOFF(TSubScheduler, iSSX.iIrqNestCount));
 	asm("jge short rwrlec_preemption_die ");	/* If called from ISR, die */
 	asm("cmp dword ptr [edx+%0], 0" : : "i" _FOFF(TSubScheduler, iKernLockCount));
 	asm("jnz short rwrlec_1 ");			/* Preemption disabled - OK */
@@ -641,7 +642,7 @@
 	asm("rwwlec_preemption: ");
 	asm("cmp cl, 0xff ");
 	asm("je short rwwlec_1 ");			/* EOrderNone - don't check interrupts or preemption */
-	asm("cmp dword ptr [edx+52+%0], 0" : : "i"_FOFF(TSubScheduler, iExtras));
+	asm("cmp dword ptr [edx+%0], 0" : : "i"_FOFF(TSubScheduler, iSSX.iIrqNestCount));
 	asm("jge short rwwlec_preemption_die ");	/* If called from ISR, die */
 	asm("cmp dword ptr [edx+%0], 0" : : "i" _FOFF(TSubScheduler, iKernLockCount));
 	asm("jnz short rwwlec_1 ");			/* Preemption disabled - OK */