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
aadc1a0a
Commit
aadc1a0a
authored
May 03, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
May 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move init_cpu_info() below create_logical_proc_info().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ee60762
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
40 deletions
+40
-40
system.c
dlls/ntdll/unix/system.c
+40
-40
No files found.
dlls/ntdll/unix/system.c
View file @
aadc1a0a
...
...
@@ -536,46 +536,6 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info )
#endif
/* End architecture specific feature detection for CPUs */
/******************************************************************
* init_cpu_info
*
* inits a couple of places with CPU related information:
* - cpu_info in this file
* - Peb->NumberOfProcessors
* - SharedUserData->ProcessFeatures[] array
*/
void
init_cpu_info
(
void
)
{
long
num
;
#ifdef _SC_NPROCESSORS_ONLN
num
=
sysconf
(
_SC_NPROCESSORS_ONLN
);
if
(
num
<
1
)
{
num
=
1
;
WARN
(
"Failed to detect the number of processors.
\n
"
);
}
#elif defined(CTL_HW) && defined(HW_NCPU)
int
mib
[
2
];
size_t
len
=
sizeof
(
num
);
mib
[
0
]
=
CTL_HW
;
mib
[
1
]
=
HW_NCPU
;
if
(
sysctl
(
mib
,
2
,
&
num
,
&
len
,
NULL
,
0
)
!=
0
)
{
num
=
1
;
WARN
(
"Failed to detect the number of processors.
\n
"
);
}
#else
num
=
1
;
FIXME
(
"Detecting the number of processors is not supported.
\n
"
);
#endif
peb
->
NumberOfProcessors
=
num
;
get_cpuinfo
(
&
cpu_info
);
TRACE
(
"<- CPU arch %d, level %d, rev %d, features 0x%x
\n
"
,
cpu_info
.
ProcessorArchitecture
,
cpu_info
.
ProcessorLevel
,
cpu_info
.
ProcessorRevision
,
cpu_info
.
ProcessorFeatureBits
);
}
static
BOOL
grow_logical_proc_buf
(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
**
pdata
,
DWORD
*
max_len
)
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION
*
new_data
;
...
...
@@ -1254,6 +1214,46 @@ static NTSTATUS create_logical_proc_info( SYSTEM_LOGICAL_PROCESSOR_INFORMATION *
}
#endif
/******************************************************************
* init_cpu_info
*
* inits a couple of places with CPU related information:
* - cpu_info in this file
* - Peb->NumberOfProcessors
* - SharedUserData->ProcessFeatures[] array
*/
void
init_cpu_info
(
void
)
{
long
num
;
#ifdef _SC_NPROCESSORS_ONLN
num
=
sysconf
(
_SC_NPROCESSORS_ONLN
);
if
(
num
<
1
)
{
num
=
1
;
WARN
(
"Failed to detect the number of processors.
\n
"
);
}
#elif defined(CTL_HW) && defined(HW_NCPU)
int
mib
[
2
];
size_t
len
=
sizeof
(
num
);
mib
[
0
]
=
CTL_HW
;
mib
[
1
]
=
HW_NCPU
;
if
(
sysctl
(
mib
,
2
,
&
num
,
&
len
,
NULL
,
0
)
!=
0
)
{
num
=
1
;
WARN
(
"Failed to detect the number of processors.
\n
"
);
}
#else
num
=
1
;
FIXME
(
"Detecting the number of processors is not supported.
\n
"
);
#endif
peb
->
NumberOfProcessors
=
num
;
get_cpuinfo
(
&
cpu_info
);
TRACE
(
"<- CPU arch %d, level %d, rev %d, features 0x%x
\n
"
,
cpu_info
.
ProcessorArchitecture
,
cpu_info
.
ProcessorLevel
,
cpu_info
.
ProcessorRevision
,
cpu_info
.
ProcessorFeatureBits
);
}
static
NTSTATUS
create_cpuset_info
(
SYSTEM_CPU_SET_INFORMATION
*
info
)
{
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX
*
proc_info
;
...
...
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