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
9885b0ac
Commit
9885b0ac
authored
Nov 25, 2019
by
Anastasios Simeonidis
Committed by
Alexandre Julliard
Dec 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move relationship filtering to create_logical_proc_info.
Signed-off-by:
Anastasios Simeonidis
<
symeonidis@csd.auth.gr
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
93f683eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
nt.c
dlls/ntdll/nt.c
+12
-9
No files found.
dlls/ntdll/nt.c
View file @
9885b0ac
...
@@ -1693,7 +1693,7 @@ static BOOL sysfs_count_list_elements(const char *filename, DWORD *result)
...
@@ -1693,7 +1693,7 @@ static BOOL sysfs_count_list_elements(const char *filename, DWORD *result)
/* for 'data', max_len is the array count. for 'dataex', max_len is in bytes */
/* for 'data', max_len is the array count. for 'dataex', max_len is in bytes */
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
)
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
,
DWORD
relation
)
{
{
static
const
char
core_info
[]
=
"/sys/devices/system/cpu/cpu%u/topology/%s"
;
static
const
char
core_info
[]
=
"/sys/devices/system/cpu/cpu%u/topology/%s"
;
static
const
char
cache_info
[]
=
"/sys/devices/system/cpu/cpu%u/cache/index%u/%s"
;
static
const
char
cache_info
[]
=
"/sys/devices/system/cpu/cpu%u/cache/index%u/%s"
;
...
@@ -1704,6 +1704,9 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
...
@@ -1704,6 +1704,9 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
char
op
,
name
[
MAX_PATH
];
char
op
,
name
[
MAX_PATH
];
ULONG_PTR
all_cpus_mask
=
0
;
ULONG_PTR
all_cpus_mask
=
0
;
if
(
relation
!=
RelationAll
)
FIXME
(
"Relationship filtering not implemented: 0x%x
\n
"
,
relation
);
/* On systems with a large number of CPU cores (32 or 64 depending on 32-bit or 64-bit),
/* On systems with a large number of CPU cores (32 or 64 depending on 32-bit or 64-bit),
* we have issues parsing processor information:
* we have issues parsing processor information:
* - ULONG_PTR masks as used in data structures can't hold all cores. Requires splitting
* - ULONG_PTR masks as used in data structures can't hold all cores. Requires splitting
...
@@ -1913,7 +1916,7 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
...
@@ -1913,7 +1916,7 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
#elif defined(__APPLE__)
#elif defined(__APPLE__)
/* for 'data', max_len is the array count. for 'dataex', max_len is in bytes */
/* for 'data', max_len is the array count. for 'dataex', max_len is in bytes */
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
)
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
,
DWORD
relation
)
{
{
DWORD
pkgs_no
,
cores_no
,
lcpu_no
,
lcpu_per_core
,
cores_per_package
,
assoc
,
len
=
0
;
DWORD
pkgs_no
,
cores_no
,
lcpu_no
,
lcpu_per_core
,
cores_per_package
,
assoc
,
len
=
0
;
DWORD
cache_ctrs
[
10
]
=
{
0
};
DWORD
cache_ctrs
[
10
]
=
{
0
};
...
@@ -1923,6 +1926,9 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
...
@@ -1923,6 +1926,9 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
size_t
size
;
size_t
size
;
DWORD
p
,
i
,
j
,
k
;
DWORD
p
,
i
,
j
,
k
;
if
(
relation
!=
RelationAll
)
FIXME
(
"Relationship filtering not implemented: 0x%x
\n
"
,
relation
);
lcpu_no
=
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
;
lcpu_no
=
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
;
size
=
sizeof
(
pkgs_no
);
size
=
sizeof
(
pkgs_no
);
...
@@ -2048,7 +2054,7 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
...
@@ -2048,7 +2054,7 @@ static NTSTATUS create_logical_proc_info(SYSTEM_LOGICAL_PROCESSOR_INFORMATION **
}
}
#else
#else
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
static
NTSTATUS
create_logical_proc_info
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
data
,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
)
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
**
dataex
,
DWORD
*
max_len
,
DWORD
relation
)
{
{
FIXME
(
"stub
\n
"
);
FIXME
(
"stub
\n
"
);
return
STATUS_NOT_IMPLEMENTED
;
return
STATUS_NOT_IMPLEMENTED
;
...
@@ -2970,7 +2976,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
...
@@ -2970,7 +2976,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
break
;
break
;
}
}
ret
=
create_logical_proc_info
(
&
buf
,
NULL
,
&
len
);
ret
=
create_logical_proc_info
(
&
buf
,
NULL
,
&
len
,
RelationAll
);
if
(
ret
!=
STATUS_SUCCESS
)
if
(
ret
!=
STATUS_SUCCESS
)
{
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buf
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buf
);
...
@@ -3059,9 +3065,6 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
...
@@ -3059,9 +3065,6 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
break
;
break
;
}
}
if
(
*
(
DWORD
*
)
Query
!=
RelationAll
)
FIXME
(
"Relationship filtering not implemented: 0x%x
\n
"
,
*
(
DWORD
*
)
Query
);
len
=
3
*
sizeof
(
*
buf
);
len
=
3
*
sizeof
(
*
buf
);
buf
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
);
buf
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
len
);
if
(
!
buf
)
if
(
!
buf
)
...
@@ -3070,7 +3073,7 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
...
@@ -3070,7 +3073,7 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
break
;
break
;
}
}
ret
=
create_logical_proc_info
(
NULL
,
&
buf
,
&
len
);
ret
=
create_logical_proc_info
(
NULL
,
&
buf
,
&
len
,
*
(
DWORD
*
)
Query
);
if
(
ret
!=
STATUS_SUCCESS
)
if
(
ret
!=
STATUS_SUCCESS
)
{
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buf
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
buf
);
...
@@ -3082,7 +3085,7 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
...
@@ -3082,7 +3085,7 @@ NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS SystemInform
if
(
!
SystemInformation
)
if
(
!
SystemInformation
)
ret
=
STATUS_ACCESS_VIOLATION
;
ret
=
STATUS_ACCESS_VIOLATION
;
else
else
memcpy
(
SystemInformation
,
buf
,
len
);
memcpy
(
SystemInformation
,
buf
,
len
);
}
}
else
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
...
...
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