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
51a73216
Commit
51a73216
authored
May 30, 2019
by
Derek Lesho
Committed by
Alexandre Julliard
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement KeAreApcsDisabled.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f748d679
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+14
-2
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+1
-0
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+23
-0
ntddk.h
include/ddk/ntddk.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
51a73216
...
...
@@ -3569,7 +3569,8 @@ NTSTATUS WINAPI IoCsqInitialize(PIO_CSQ csq, PIO_CSQ_INSERT_IRP insert_irp, PIO_
*/
void
WINAPI
KeEnterCriticalRegion
(
void
)
{
FIXME
(
": stub
\n
"
);
TRACE
(
"semi-stub
\n
"
);
KeGetCurrentThread
()
->
critical_region
++
;
}
/***********************************************************************
...
...
@@ -3577,7 +3578,18 @@ void WINAPI KeEnterCriticalRegion(void)
*/
void
WINAPI
KeLeaveCriticalRegion
(
void
)
{
FIXME
(
": stub
\n
"
);
TRACE
(
"semi-stub
\n
"
);
KeGetCurrentThread
()
->
critical_region
--
;
}
/***********************************************************************
* KeAreApcsDisabled (NTOSKRNL.@)
*/
BOOLEAN
WINAPI
KeAreApcsDisabled
(
void
)
{
unsigned
int
critical_region
=
KeGetCurrentThread
()
->
critical_region
;
TRACE
(
"%u
\n
"
,
critical_region
);
return
!!
critical_region
;
}
/***********************************************************************
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
51a73216
...
...
@@ -523,7 +523,7 @@
@ stdcall KeAcquireSpinLockAtDpcLevel(ptr)
@ stdcall -arch=arm,arm64,x86_64 KeAcquireSpinLockRaiseToDpc(ptr)
@ stub KeAddSystemServiceTable
@ st
ub KeAreApcsDisabled
@ st
dcall KeAreApcsDisabled()
@ stub KeAttachProcess
@ stub KeBugCheck
@ stub KeBugCheckEx
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
51a73216
...
...
@@ -41,6 +41,7 @@ struct _KTHREAD
DISPATCHER_HEADER
header
;
PEPROCESS
process
;
CLIENT_ID
id
;
unsigned
int
critical_region
;
};
struct
_ETHREAD
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
51a73216
...
...
@@ -370,6 +370,27 @@ static void test_current_thread(BOOL is_system)
ok
(
!
ret
,
"ZwClose failed: %#x
\n
"
,
ret
);
}
static
void
test_critical_region
(
BOOL
is_dispatcher
)
{
BOOLEAN
result
;
KeEnterCriticalRegion
();
KeEnterCriticalRegion
();
result
=
KeAreApcsDisabled
();
ok
(
result
==
TRUE
,
"KeAreApcsDisabled returned %x
\n
"
,
result
);
KeLeaveCriticalRegion
();
result
=
KeAreApcsDisabled
();
ok
(
result
==
TRUE
,
"KeAreApcsDisabled returned %x
\n
"
,
result
);
KeLeaveCriticalRegion
();
result
=
KeAreApcsDisabled
();
todo_wine_if
(
is_dispatcher
)
ok
(
result
==
is_dispatcher
||
broken
(
is_dispatcher
&&
!
result
),
"KeAreApcsDisabled returned %x
\n
"
,
result
);
}
static
void
sleep
(
void
)
{
LARGE_INTEGER
timeout
;
...
...
@@ -1490,6 +1511,7 @@ static void WINAPI main_test_task(DEVICE_OBJECT *device, void *context)
main_test_work_item
=
NULL
;
test_current_thread
(
TRUE
);
test_critical_region
(
FALSE
);
test_call_driver
(
device
);
test_cancel_irp
(
device
);
...
...
@@ -1546,6 +1568,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_irp_struct
(
irp
,
device
);
test_current_thread
(
FALSE
);
test_critical_region
(
TRUE
);
test_mdl_map
();
test_init_funcs
();
test_load_driver
();
...
...
include/ddk/ntddk.h
View file @
51a73216
...
...
@@ -216,6 +216,7 @@ NTSTATUS WINAPI IoQueryDeviceDescription(PINTERFACE_TYPE,PULONG,PCONFIGURATION_
PCONFIGURATION_TYPE
,
PULONG
,
PIO_QUERY_DEVICE_ROUTINE
,
PVOID
);
void
WINAPI
IoRegisterDriverReinitialization
(
PDRIVER_OBJECT
,
PDRIVER_REINITIALIZE
,
PVOID
);
NTSTATUS
WINAPI
IoRegisterShutdownNotification
(
PDEVICE_OBJECT
);
BOOLEAN
WINAPI
KeAreApcsDisabled
(
void
);
NTSTATUS
WINAPI
KeExpandKernelStackAndCallout
(
PEXPAND_STACK_CALLOUT
,
void
*
,
SIZE_T
);
void
WINAPI
KeSetTargetProcessorDpc
(
PRKDPC
,
CCHAR
);
BOOLEAN
WINAPI
MmIsAddressValid
(
void
*
);
...
...
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