Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bd3a08b3
Commit
bd3a08b3
authored
May 18, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implemented a couple of time-related APIs.
parent
73cc00f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+37
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+3
-3
wdm.h
include/ddk/wdm.h
+3
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
bd3a08b3
...
...
@@ -130,6 +130,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
IO_STACK_LOCATION
irpsp
;
PDRIVER_DISPATCH
dispatch
=
device
->
DriverObject
->
MajorFunction
[
IRP_MJ_DEVICE_CONTROL
];
NTSTATUS
status
;
LARGE_INTEGER
count
;
TRACE
(
"ioctl %x device %p in_size %u out_size %u
\n
"
,
code
,
device
,
in_size
,
*
out_size
);
...
...
@@ -159,6 +160,8 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
device
->
CurrentIrp
=
&
irp
;
KeQueryTickCount
(
&
count
);
/* update the global KeTickCount */
if
(
TRACE_ON
(
relay
))
DPRINTF
(
"%04x:Call driver dispatch %p (device=%p,irp=%p)
\n
"
,
GetCurrentThreadId
(),
dispatch
,
device
,
&
irp
);
...
...
@@ -416,6 +419,37 @@ void WINAPI ExFreePoolWithTag( void *ptr, ULONG tag )
/***********************************************************************
* KeQuerySystemTime (NTOSKRNL.EXE.@)
*/
void
WINAPI
KeQuerySystemTime
(
LARGE_INTEGER
*
time
)
{
NtQuerySystemTime
(
time
);
}
/***********************************************************************
* KeQueryTickCount (NTOSKRNL.EXE.@)
*/
void
WINAPI
KeQueryTickCount
(
LARGE_INTEGER
*
count
)
{
count
->
QuadPart
=
NtGetTickCount
();
/* update the global variable too */
KeTickCount
.
LowPart
=
count
->
u
.
LowPart
;
KeTickCount
.
High1Time
=
count
->
u
.
HighPart
;
KeTickCount
.
High2Time
=
count
->
u
.
HighPart
;
}
/***********************************************************************
* KeQueryTimeIncrement (NTOSKRNL.EXE.@)
*/
ULONG
WINAPI
KeQueryTimeIncrement
(
void
)
{
return
10000
;
}
/***********************************************************************
* MmAllocateNonCachedMemory (NTOSKRNL.EXE.@)
*/
LPVOID
WINAPI
MmAllocateNonCachedMemory
(
SIZE_T
size
)
...
...
@@ -493,11 +527,14 @@ NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( PCREATE_PROCESS_NOTIFY_ROUTINE
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
LARGE_INTEGER
count
;
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
inst
);
RtlAddVectoredExceptionHandler
(
TRUE
,
vectored_handler
);
KeQueryTickCount
(
&
count
);
/* initialize the global KeTickCount */
break
;
}
return
TRUE
;
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
bd3a08b3
...
...
@@ -573,9 +573,9 @@
@ stub KeQueryInterruptTime
@ stub KeQueryPriorityThread
@ stub KeQueryRuntimeThread
@ st
ub KeQuerySystemTime
@ st
ub KeQueryTickCount
@ st
ub KeQueryTimeIncrement
@ st
dcall KeQuerySystemTime(ptr)
@ st
dcall KeQueryTickCount(ptr)
@ st
dcall KeQueryTimeIncrement()
@ stub KeRaiseUserException
@ stub KeReadStateEvent
@ stub KeReadStateMutant
...
...
include/ddk/wdm.h
View file @
bd3a08b3
...
...
@@ -874,6 +874,9 @@ NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
PEPROCESS
WINAPI
IoGetCurrentProcess
(
void
);
PKTHREAD
WINAPI
KeGetCurrentThread
(
void
);
void
WINAPI
KeQuerySystemTime
(
LARGE_INTEGER
*
);
void
WINAPI
KeQueryTickCount
(
LARGE_INTEGER
*
);
ULONG
WINAPI
KeQueryTimeIncrement
(
void
);
LPVOID
WINAPI
MmAllocateNonCachedMemory
(
SIZE_T
);
void
WINAPI
MmFreeNonCachedMemory
(
PVOID
,
SIZE_T
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment