On 06/02/2014 11:06 AM, Sven Barth wrote:


Addendum: yes, the RTL calls the core DLLs of the Win32 subsystem like kernel32.dll, but they are just that: the core DLLs of the Win32 subsystem. They don't implement any core OS functionality like hardware/device management, because that is done by the NT kernel below it which is called by the Win32 DLLs if needed using the ntdll.dll which acts as a gateway to the kernel (some calls will do a Syscall then, for example hardware related functions, while others like functions to handle list structures will stay in the current mode). That's basically a remnant of the microkernel nature of the NT OS.



This is rather similar to  what I assumed.

Hence, if (as your other post suggests) that Kernel dll switches to Kernel mode to access TSC in an X86 archs while this is not necessary, that is a fault of Windows' and not a fault of fpc's and hence we can't help it. As we found, "blindly" reading is not a good idea, so a really fast rtl function would need to detect the CPU sub-arch and act appropriately. I understand that this is close to impossible.

-Michael
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to