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
fd3574a1
Commit
fd3574a1
authored
Sep 23, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix processor package mask in SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX structure.
Fixes a regression introduced by commit
6aa437de
.
parent
ad26f04f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
32 deletions
+38
-32
system.c
dlls/ntdll/unix/system.c
+38
-32
No files found.
dlls/ntdll/unix/system.c
View file @
fd3574a1
...
...
@@ -591,39 +591,10 @@ static DWORD count_bits( ULONG_PTR mask )
return
count
;
}
/* Store package and core information for a logical processor. Parsing of processor
* data may happen in multiple passes; the 'id' parameter is then used to locate
* previously stored data. The type of data stored in 'id' depends on 'rel':
* - RelationProcessorPackage: package id ('CPU socket').
* - RelationProcessorCore: physical core number.
*/
static
BOOL
logical_proc_info_add_by_id
(
LOGICAL_PROCESSOR_RELATIONSHIP
rel
,
DWORD
id
,
ULONG_PTR
mask
)
static
BOOL
logical_proc_info_ex_add_by_id
(
LOGICAL_PROCESSOR_RELATIONSHIP
rel
,
DWORD
id
,
ULONG_PTR
mask
)
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
*
dataex
;
unsigned
int
ofs
=
0
,
i
;
for
(
i
=
0
;
i
<
logical_proc_info_len
;
i
++
)
{
if
(
rel
==
RelationProcessorPackage
&&
logical_proc_info
[
i
].
Relationship
==
rel
&&
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
==
id
)
{
logical_proc_info
[
i
].
ProcessorMask
|=
mask
;
return
TRUE
;
}
else
if
(
rel
==
RelationProcessorCore
&&
logical_proc_info
[
i
].
Relationship
==
rel
&&
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
==
id
)
return
TRUE
;
}
if
(
!
grow_logical_proc_buf
())
return
FALSE
;
logical_proc_info
[
i
].
Relationship
=
rel
;
logical_proc_info
[
i
].
ProcessorMask
=
mask
;
if
(
rel
==
RelationProcessorCore
)
logical_proc_info
[
i
].
u
.
ProcessorCore
.
Flags
=
count_bits
(
mask
)
>
1
?
LTP_PC_SMT
:
0
;
logical_proc_info
[
i
].
u
.
Reserved
[
0
]
=
0
;
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
=
id
;
logical_proc_info_len
=
i
+
1
;
unsigned
int
ofs
=
0
;
while
(
ofs
<
logical_proc_info_ex_size
)
{
...
...
@@ -661,10 +632,45 @@ static BOOL logical_proc_info_add_by_id( LOGICAL_PROCESSOR_RELATIONSHIP rel, DWO
dataex
->
u
.
Processor
.
Reserved
[
1
]
=
id
;
logical_proc_info_ex_size
+=
dataex
->
Size
;
return
TRUE
;
}
/* Store package and core information for a logical processor. Parsing of processor
* data may happen in multiple passes; the 'id' parameter is then used to locate
* previously stored data. The type of data stored in 'id' depends on 'rel':
* - RelationProcessorPackage: package id ('CPU socket').
* - RelationProcessorCore: physical core number.
*/
static
BOOL
logical_proc_info_add_by_id
(
LOGICAL_PROCESSOR_RELATIONSHIP
rel
,
DWORD
id
,
ULONG_PTR
mask
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
logical_proc_info_len
;
i
++
)
{
if
(
rel
==
RelationProcessorPackage
&&
logical_proc_info
[
i
].
Relationship
==
rel
&&
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
==
id
)
{
logical_proc_info
[
i
].
ProcessorMask
|=
mask
;
return
logical_proc_info_ex_add_by_id
(
rel
,
id
,
mask
);
}
else
if
(
rel
==
RelationProcessorCore
&&
logical_proc_info
[
i
].
Relationship
==
rel
&&
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
==
id
)
return
logical_proc_info_ex_add_by_id
(
rel
,
id
,
mask
);
}
if
(
!
grow_logical_proc_buf
())
return
FALSE
;
logical_proc_info
[
i
].
Relationship
=
rel
;
logical_proc_info
[
i
].
ProcessorMask
=
mask
;
if
(
rel
==
RelationProcessorCore
)
logical_proc_info
[
i
].
u
.
ProcessorCore
.
Flags
=
count_bits
(
mask
)
>
1
?
LTP_PC_SMT
:
0
;
logical_proc_info
[
i
].
u
.
Reserved
[
0
]
=
0
;
logical_proc_info
[
i
].
u
.
Reserved
[
1
]
=
id
;
logical_proc_info_len
=
i
+
1
;
return
logical_proc_info_ex_add_by_id
(
rel
,
id
,
mask
);
}
static
BOOL
logical_proc_info_add_cache
(
ULONG_PTR
mask
,
CACHE_DESCRIPTOR
*
cache
)
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
*
dataex
;
...
...
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