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
20276d0b
Commit
20276d0b
authored
Aug 07, 2009
by
Andrew Nguyen
Committed by
Alexandre Julliard
Aug 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Revise SetThreadIdealProcessor to return success.
parent
e306b913
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
thread.c
dlls/kernel32/tests/thread.c
+17
-15
thread.c
dlls/kernel32/thread.c
+6
-2
No files found.
dlls/kernel32/tests/thread.c
View file @
20276d0b
...
...
@@ -812,22 +812,24 @@ static VOID test_thread_processor(void)
"SetThreadAffinityMask passed for an illegal processor
\n
"
);
/* NOTE: This only works on WinNT/2000/XP) */
if
(
pSetThreadIdealProcessor
)
{
todo_wine
{
SetLastError
(
0
);
error
=
pSetThreadIdealProcessor
(
curthread
,
0
);
if
(
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
ok
(
error
!=-
1
,
"SetThreadIdealProcessor failed
\n
"
);
}
}
if
(
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
error
=
pSetThreadIdealProcessor
(
curthread
,
MAXIMUM_PROCESSORS
+
1
);
ok
(
error
==-
1
,
"SetThreadIdealProcessor succeeded with an illegal processor #
\n
"
);
todo_wine
{
error
=
pSetThreadIdealProcessor
(
curthread
,
MAXIMUM_PROCESSORS
);
ok
(
error
==
0
,
"SetThreadIdealProcessor returned an incorrect value
\n
"
);
}
SetLastError
(
0xdeadbeef
);
error
=
pSetThreadIdealProcessor
(
curthread
,
0
);
if
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
win_skip
(
"SetThreadIdealProcessor is not implemented
\n
"
);
return
;
}
ok
(
error
!=-
1
,
"SetThreadIdealProcessor failed
\n
"
);
SetLastError
(
0xdeadbeef
);
error
=
pSetThreadIdealProcessor
(
curthread
,
MAXIMUM_PROCESSORS
+
1
);
ok
(
error
==-
1
,
"SetThreadIdealProcessor succeeded with an illegal processor #
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
error
=
pSetThreadIdealProcessor
(
curthread
,
MAXIMUM_PROCESSORS
);
ok
(
error
==
0
,
"SetThreadIdealProcessor returned an incorrect value
\n
"
);
}
}
...
...
dlls/kernel32/thread.c
View file @
20276d0b
...
...
@@ -413,8 +413,12 @@ DWORD WINAPI SetThreadIdealProcessor(
DWORD
dwIdealProcessor
)
/* [in] Specifies the new preferred processor */
{
FIXME
(
"(%p): stub
\n
"
,
hThread
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
-
1L
;
if
(
dwIdealProcessor
>
MAXIMUM_PROCESSORS
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
return
0
;
}
...
...
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