Author: aandrejevic
Date: Sun Jun 23 00:47:47 2013
New Revision: 59299
URL:
http://svn.reactos.org/svn/reactos?rev=59299&view=rev
Log:
[NTOSKRNL]
Implement NtSetTimerResolution.
Modified:
branches/ntvdm/ntoskrnl/ke/clock.c
Modified: branches/ntvdm/ntoskrnl/ke/clock.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/ntoskrnl/ke/clock.c?rev=5…
==============================================================================
--- branches/ntvdm/ntoskrnl/ke/clock.c [iso-8859-1] (original)
+++ branches/ntvdm/ntoskrnl/ke/clock.c [iso-8859-1] Sun Jun 23 00:47:47 2013
@@ -252,8 +252,26 @@
IN BOOLEAN SetResolution,
OUT PULONG CurrentResolution)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ ULONG NewResolution;
+
+ /* Call the internal API */
+ NewResolution = ExSetTimerResolution(DesiredResolution, SetResolution);
+
+ /* Return the resolution to the caller */
+ _SEH2_TRY
+ {
+ ProbeForWriteUlong(CurrentResolution);
+ *CurrentResolution = NewResolution;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+
+ /* Return success if we set the resolution */
+ if (SetResolution) return STATUS_SUCCESS;
+ else return STATUS_TIMER_RESOLUTION_NOT_SET;
}
/* EOF */