Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
94e958c6
Commit
94e958c6
authored
May 27, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Add a macro to declare a static CRITICAL_SECTION.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
72876116
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
32 deletions
+11
-32
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+3
-24
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+7
-0
sync.c
dlls/ntoskrnl.exe/sync.c
+1
-8
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
94e958c6
...
...
@@ -133,14 +133,7 @@ static int interface_rb_compare( const void *key, const struct wine_rb_entry *en
static
struct
wine_rb_tree
device_interfaces
=
{
interface_rb_compare
};
static
CRITICAL_SECTION
drivers_cs
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
drivers_cs
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": drivers_cs"
)
}
};
static
CRITICAL_SECTION
drivers_cs
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
DECLARE_CRITICAL_SECTION
(
drivers_cs
);
static
inline
LPCSTR
debugstr_us
(
const
UNICODE_STRING
*
us
)
{
...
...
@@ -286,14 +279,7 @@ void *alloc_kernel_object( POBJECT_TYPE type, HANDLE handle, SIZE_T size, LONG r
return
header
+
1
;
}
static
CRITICAL_SECTION
obref_cs
;
static
CRITICAL_SECTION_DEBUG
obref_critsect_debug
=
{
0
,
0
,
&
obref_cs
,
{
&
obref_critsect_debug
.
ProcessLocksList
,
&
obref_critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": obref_cs"
)
}
};
static
CRITICAL_SECTION
obref_cs
=
{
&
obref_critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
DECLARE_CRITICAL_SECTION
(
obref_cs
);
/***********************************************************************
* ObDereferenceObject (NTOSKRNL.EXE.@)
...
...
@@ -384,14 +370,7 @@ static const POBJECT_TYPE *known_types[] =
&
SeTokenObjectType
};
static
CRITICAL_SECTION
handle_map_cs
;
static
CRITICAL_SECTION_DEBUG
handle_map_critsect_debug
=
{
0
,
0
,
&
handle_map_cs
,
{
&
handle_map_critsect_debug
.
ProcessLocksList
,
&
handle_map_critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": handle_map_cs"
)
}
};
static
CRITICAL_SECTION
handle_map_cs
=
{
&
handle_map_critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
DECLARE_CRITICAL_SECTION
(
handle_map_cs
);
NTSTATUS
kernel_object_from_handle
(
HANDLE
handle
,
POBJECT_TYPE
type
,
void
**
ret
)
{
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
94e958c6
...
...
@@ -60,4 +60,11 @@ extern POBJECT_TYPE PsProcessType;
extern
POBJECT_TYPE
PsThreadType
;
extern
POBJECT_TYPE
SeTokenObjectType
;
#define DECLARE_CRITICAL_SECTION(cs) \
static CRITICAL_SECTION cs; \
static CRITICAL_SECTION_DEBUG cs##_debug = \
{ 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 };
#endif
dlls/ntoskrnl.exe/sync.c
View file @
94e958c6
...
...
@@ -49,14 +49,7 @@ enum object_type
TYPE_AUTO_TIMER
=
9
,
};
static
CRITICAL_SECTION
sync_cs
;
static
CRITICAL_SECTION_DEBUG
sync_cs_debug
=
{
0
,
0
,
&
sync_cs
,
{
&
sync_cs_debug
.
ProcessLocksList
,
&
sync_cs_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": sync_cs"
)
}
};
static
CRITICAL_SECTION
sync_cs
=
{
&
sync_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
DECLARE_CRITICAL_SECTION
(
sync_cs
);
/***********************************************************************
* KeWaitForMultipleObjects (NTOSKRNL.EXE.@)
...
...
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