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
1865c47f
Commit
1865c47f
authored
Oct 31, 2008
by
Aric Stewart
Committed by
Alexandre Julliard
Nov 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix parsing of proc file. Also correct memory deallocation on the Mac.
parent
6ccf01fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
nt.c
dlls/ntdll/nt.c
+10
-3
No files found.
dlls/ntdll/nt.c
View file @
1865c47f
...
...
@@ -938,7 +938,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
sppi
[
i
].
liKernelTime
.
QuadPart
=
pinfo
[
i
].
cpu_ticks
[
CPU_STATE_SYSTEM
];
sppi
[
i
].
liUserTime
.
QuadPart
=
pinfo
[
i
].
cpu_ticks
[
CPU_STATE_USER
];
}
vm_deallocate
(
mach_task_self
(),
(
vm_address_t
)
pinfo
,
info_count
);
vm_deallocate
(
mach_task_self
(),
(
vm_address_t
)
pinfo
,
info_count
*
sizeof
(
natural_t
)
);
}
}
#else
...
...
@@ -950,10 +950,14 @@ NTSTATUS WINAPI NtQuerySystemInformation(
unsigned
long
idle
;
int
count
;
char
name
[
10
];
char
line
[
255
];
/* first line is combined usage */
count
=
fscanf
(
cpuinfo
,
"%s %u %u %u %lu"
,
name
,
&
usr
,
&
nice
,
if
(
fgets
(
line
,
255
,
cpuinfo
))
count
=
sscanf
(
line
,
"%s %u %u %u %lu"
,
name
,
&
usr
,
&
nice
,
&
sys
,
&
idle
);
else
count
=
0
;
/* we set this up in the for older non-smp enabled kernels */
if
(
count
==
5
&&
strcmp
(
name
,
"cpu"
)
==
0
)
{
...
...
@@ -968,8 +972,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
do
{
count
=
fscanf
(
cpuinfo
,
"%s %u %u %u %lu"
,
name
,
&
usr
,
if
(
fgets
(
line
,
255
,
cpuinfo
))
count
=
sscanf
(
line
,
"%s %u %u %u %lu"
,
name
,
&
usr
,
&
nice
,
&
sys
,
&
idle
);
else
count
=
0
;
if
(
count
==
5
&&
strncmp
(
name
,
"cpu"
,
3
)
==
0
)
{
out_cpus
--
;
...
...
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