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
5ecea501
Commit
5ecea501
authored
Feb 14, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make the CPU information global.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f0d6692
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
nt.c
dlls/ntdll/nt.c
+6
-7
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
No files found.
dlls/ntdll/nt.c
View file @
5ecea501
...
...
@@ -926,7 +926,7 @@ NTSTATUS WINAPI NtSetIntervalProfile(
return
STATUS_SUCCESS
;
}
static
SYSTEM_CPU_INFORMATION
cached_sci
;
SYSTEM_CPU_INFORMATION
cpu_info
=
{
0
}
;
/*******************************************************************************
* Architecture specific feature detection for CPUs
...
...
@@ -1305,7 +1305,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
* fill_cpu_info
*
* inits a couple of places with CPU related information:
* - c
ached_sci
in this file
* - c
pu_info
in this file
* - Peb->NumberOfProcessors
* - SharedUserData->ProcessFeatures[] array
*/
...
...
@@ -1336,11 +1336,10 @@ void fill_cpu_info(void)
#endif
NtCurrentTeb
()
->
Peb
->
NumberOfProcessors
=
num
;
memset
(
&
cached_sci
,
0
,
sizeof
(
cached_sci
));
get_cpuinfo
(
&
cached_sci
);
get_cpuinfo
(
&
cpu_info
);
TRACE
(
"<- CPU arch %d, level %d, rev %d, features 0x%x
\n
"
,
c
ached_sci
.
Architecture
,
cached_sci
.
Level
,
cached_sci
.
Revision
,
cached_sci
.
FeatureSet
);
c
pu_info
.
Architecture
,
cpu_info
.
Level
,
cpu_info
.
Revision
,
cpu_info
.
FeatureSet
);
}
static
BOOL
grow_logical_proc_buf
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
pdata
,
...
...
@@ -2287,10 +2286,10 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
break
;
case
SystemCpuInformation
:
if
(
Length
>=
(
len
=
sizeof
(
c
ached_sci
)))
if
(
Length
>=
(
len
=
sizeof
(
c
pu_info
)))
{
if
(
!
SystemInformation
)
ret
=
STATUS_ACCESS_VIOLATION
;
else
memcpy
(
SystemInformation
,
&
c
ached_sci
,
len
);
else
memcpy
(
SystemInformation
,
&
c
pu_info
,
len
);
}
else
ret
=
STATUS_INFO_LENGTH_MISMATCH
;
break
;
...
...
dlls/ntdll/ntdll_misc.h
View file @
5ecea501
...
...
@@ -248,6 +248,7 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
extern
mode_t
FILE_umask
DECLSPEC_HIDDEN
;
extern
HANDLE
keyed_event
DECLSPEC_HIDDEN
;
extern
SYSTEM_CPU_INFORMATION
cpu_info
DECLSPEC_HIDDEN
;
#define HASH_STRING_ALGORITHM_DEFAULT 0
#define HASH_STRING_ALGORITHM_X65599 1
...
...
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