server: Delay setting system registers until suspending select is waken.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5a9c256ce
commit
341068aa61
|
@ -1706,7 +1706,13 @@ DECL_HANDLER(select)
|
|||
else if (get_error() != STATUS_PENDING && get_reply_max_size() == sizeof(context_t) &&
|
||||
current->context && current->suspend_cookie == req->cookie)
|
||||
{
|
||||
if (current->context->regs.flags) set_reply_data( ¤t->context->regs, sizeof(context_t) );
|
||||
if (current->context->regs.flags)
|
||||
{
|
||||
unsigned int system_flags = get_context_system_regs(current->process->cpu) &
|
||||
current->context->regs.flags;
|
||||
if (system_flags) set_thread_context( current, ¤t->context->regs, system_flags );
|
||||
set_reply_data( ¤t->context->regs, sizeof(context_t) );
|
||||
}
|
||||
release_object( current->context );
|
||||
current->context = NULL;
|
||||
}
|
||||
|
@ -1896,14 +1902,13 @@ DECL_HANDLER(set_thread_context)
|
|||
else
|
||||
{
|
||||
unsigned int system_flags = get_context_system_regs(context->cpu) & context->flags;
|
||||
unsigned int client_flags = context->flags & ~system_flags;
|
||||
|
||||
if (system_flags) set_thread_context( thread, context, system_flags );
|
||||
if (thread != current && !get_error()) stop_thread( thread );
|
||||
if (thread != current) stop_thread( thread );
|
||||
else if (system_flags) set_thread_context( thread, context, system_flags );
|
||||
if (thread->context && !get_error())
|
||||
{
|
||||
copy_context( &thread->context->regs, context, context->flags );
|
||||
thread->context->regs.flags |= client_flags;
|
||||
thread->context->regs.flags |= context->flags;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue