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
055c883e
Commit
055c883e
authored
May 06, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Fix the status code for get/set_thread_context on a terminated thread.
parent
5dc9c73c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
thread.c
dlls/kernel32/tests/thread.c
+16
-0
thread.c
server/thread.c
+2
-2
No files found.
dlls/kernel32/tests/thread.c
View file @
055c883e
...
...
@@ -955,6 +955,22 @@ static void test_SetThreadContext(void)
WaitForSingleObject
(
thread
,
INFINITE
);
ok
(
test_value
==
20
,
"test_value %d instead of 20
\n
"
,
test_value
);
ctx
.
ContextFlags
=
CONTEXT_FULL
;
SetLastError
(
0xdeadbeef
);
ret
=
GetThreadContext
(
thread
,
&
ctx
);
ok
(
!
ret
,
"GetThreadContext succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_GEN_FAILURE
||
broken
(
GetLastError
()
==
ERROR_INVALID_HANDLE
),
/* win2k */
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
ret
=
SetThreadContext
(
thread
,
&
ctx
);
ok
(
!
ret
,
"SetThreadContext succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_GEN_FAILURE
||
GetLastError
()
==
ERROR_ACCESS_DENIED
||
broken
(
GetLastError
()
==
ERROR_INVALID_HANDLE
),
/* win2k */
"wrong error %u
\n
"
,
GetLastError
()
);
CloseHandle
(
thread
);
}
#endif
/* __i386__ */
...
...
server/thread.c
View file @
055c883e
...
...
@@ -1493,7 +1493,7 @@ DECL_HANDLER(get_thread_context)
suspend_thread
(
thread
);
}
}
else
set_error
(
STATUS_
ACCESS_DENIED
);
else
set_error
(
STATUS_
UNSUCCESSFUL
);
}
else
if
((
context
=
set_reply_data_size
(
sizeof
(
context_t
)
)))
{
...
...
@@ -1535,7 +1535,7 @@ DECL_HANDLER(set_thread_context)
suspend_thread
(
thread
);
}
}
else
set_error
(
STATUS_
ACCESS_DENIED
);
else
set_error
(
STATUS_
UNSUCCESSFUL
);
}
else
if
(
context
->
cpu
==
thread
->
process
->
cpu
)
{
...
...
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