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
5189eef6
Commit
5189eef6
authored
Apr 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix affinity mask check for 64-bit.
parent
fc81e45a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
thread.c
dlls/kernel32/tests/thread.c
+11
-1
thread.c
dlls/ntdll/thread.c
+1
-1
No files found.
dlls/kernel32/tests/thread.c
View file @
5189eef6
...
...
@@ -814,9 +814,19 @@ static VOID test_thread_processor(void)
ok
(
SetThreadAffinityMask
(
curthread
,
processMask
+
1
)
==
0
,
"SetThreadAffinityMask passed for an illegal processor
\n
"
);
/* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */
retMask
=
SetThreadAffinityMask
(
curthread
,
~
0
UL
);
retMask
=
SetThreadAffinityMask
(
curthread
,
~
0
);
ok
(
broken
(
retMask
==
0
)
||
retMask
==
processMask
,
"SetThreadAffinityMask(thread,-1) failed to request all processors.
\n
"
);
if
(
retMask
==
processMask
&&
sizeof
(
ULONG_PTR
)
>
sizeof
(
ULONG
))
{
/* only the low 32-bits matter */
retMask
=
SetThreadAffinityMask
(
curthread
,
~
(
ULONG_PTR
)
0
);
ok
(
retMask
==
processMask
,
"SetThreadAffinityMask failed
\n
"
);
retMask
=
SetThreadAffinityMask
(
curthread
,
~
(
ULONG_PTR
)
0
>>
3
);
ok
(
retMask
==
processMask
,
"SetThreadAffinityMask failed
\n
"
);
retMask
=
SetThreadAffinityMask
(
curthread
,
~
(
ULONG_PTR
)
1
);
ok
(
retMask
==
0
,
"SetThreadAffinityMask succeeded
\n
"
);
}
/* NOTE: This only works on WinNT/2000/XP) */
if
(
pSetThreadIdealProcessor
)
{
SetLastError
(
0xdeadbeef
);
...
...
dlls/ntdll/thread.c
View file @
5189eef6
...
...
@@ -1138,7 +1138,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
if
(
length
!=
sizeof
(
ULONG_PTR
))
return
STATUS_INVALID_PARAMETER
;
req_aff
=
*
(
const
ULONG_PTR
*
)
data
;
if
(
req_aff
==
~
0UL
)
req_aff
=
affinity_mask
;
if
(
(
ULONG
)
req_aff
==
~
0u
)
req_aff
=
affinity_mask
;
else
if
(
req_aff
&
~
affinity_mask
)
return
STATUS_INVALID_PARAMETER
;
else
if
(
!
req_aff
)
return
STATUS_INVALID_PARAMETER
;
SERVER_START_REQ
(
set_thread_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