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
3499cb96
Commit
3499cb96
authored
Jun 02, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add local defines for VIF and VIP flags.
parent
5fc1b36b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
signal_i386.c
dlls/ntdll/signal_i386.c
+8
-6
No files found.
dlls/ntdll/signal_i386.c
View file @
3499cb96
...
@@ -127,6 +127,8 @@ typedef ucontext_t SIGCONTEXT;
...
@@ -127,6 +127,8 @@ typedef ucontext_t SIGCONTEXT;
#define FPUX_sig(context) (FPU_sig(context) && !((context)->uc_mcontext.fpregs->status >> 16) ? (XMM_SAVE_AREA32 *)(FPU_sig(context) + 1) : NULL)
#define FPUX_sig(context) (FPU_sig(context) && !((context)->uc_mcontext.fpregs->status >> 16) ? (XMM_SAVE_AREA32 *)(FPU_sig(context) + 1) : NULL)
#define VM86_EAX 0
/* the %eax value while vm86_enter is executing */
#define VM86_EAX 0
/* the %eax value while vm86_enter is executing */
#define VIF_FLAG 0x00080000
#define VIP_FLAG 0x00100000
int
vm86_enter
(
void
**
vm86_ptr
);
int
vm86_enter
(
void
**
vm86_ptr
);
void
vm86_return
(
void
);
void
vm86_return
(
void
);
...
@@ -541,7 +543,7 @@ static void merge_vm86_pending_flags( EXCEPTION_RECORD *rec )
...
@@ -541,7 +543,7 @@ static void merge_vm86_pending_flags( EXCEPTION_RECORD *rec )
* Note that SIGUSR2 may turn VIF flag off so
* Note that SIGUSR2 may turn VIF flag off so
* VIF check must occur only when TEB.vm86_ptr is NULL.
* VIF check must occur only when TEB.vm86_ptr is NULL.
*/
*/
if
(
vm86
->
regs
.
eflags
&
VIF_
MASK
)
if
(
vm86
->
regs
.
eflags
&
VIF_
FLAG
)
{
{
CONTEXT
vcontext
;
CONTEXT
vcontext
;
save_vm86_context
(
&
vcontext
,
vm86
);
save_vm86_context
(
&
vcontext
,
vm86
);
...
@@ -552,7 +554,7 @@ static void merge_vm86_pending_flags( EXCEPTION_RECORD *rec )
...
@@ -552,7 +554,7 @@ static void merge_vm86_pending_flags( EXCEPTION_RECORD *rec )
rec
->
NumberParameters
=
0
;
rec
->
NumberParameters
=
0
;
rec
->
ExceptionAddress
=
(
LPVOID
)
vcontext
.
Eip
;
rec
->
ExceptionAddress
=
(
LPVOID
)
vcontext
.
Eip
;
vcontext
.
EFlags
&=
~
VIP_
MASK
;
vcontext
.
EFlags
&=
~
VIP_
FLAG
;
get_vm86_teb_info
()
->
vm86_pending
=
0
;
get_vm86_teb_info
()
->
vm86_pending
=
0
;
__regs_RtlRaiseException
(
rec
,
&
vcontext
);
__regs_RtlRaiseException
(
rec
,
&
vcontext
);
...
@@ -1239,7 +1241,7 @@ static void WINAPI raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
...
@@ -1239,7 +1241,7 @@ static void WINAPI raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
static
void
WINAPI
raise_vm86_sti_exception
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
static
void
WINAPI
raise_vm86_sti_exception
(
EXCEPTION_RECORD
*
rec
,
CONTEXT
*
context
)
{
{
/* merge_vm86_pending_flags merges the vm86_pending flag in safely */
/* merge_vm86_pending_flags merges the vm86_pending flag in safely */
get_vm86_teb_info
()
->
vm86_pending
|=
VIP_
MASK
;
get_vm86_teb_info
()
->
vm86_pending
|=
VIP_
FLAG
;
if
(
ntdll_get_thread_data
()
->
vm86_ptr
)
if
(
ntdll_get_thread_data
()
->
vm86_ptr
)
{
{
...
@@ -1269,7 +1271,7 @@ done:
...
@@ -1269,7 +1271,7 @@ done:
*
*
* Handler for SIGUSR2.
* Handler for SIGUSR2.
* We use it to signal that the running __wine_enter_vm86() should
* We use it to signal that the running __wine_enter_vm86() should
* immediately set VIP_
MASK
, causing pending events to be handled
* immediately set VIP_
FLAG
, causing pending events to be handled
* as early as possible.
* as early as possible.
*/
*/
static
void
usr2_handler
(
int
signal
,
siginfo_t
*
siginfo
,
void
*
sigcontext
)
static
void
usr2_handler
(
int
signal
,
siginfo_t
*
siginfo
,
void
*
sigcontext
)
...
@@ -1659,8 +1661,8 @@ void __wine_enter_vm86( CONTEXT *context )
...
@@ -1659,8 +1661,8 @@ void __wine_enter_vm86( CONTEXT *context )
rec
.
ExceptionInformation
[
0
]
=
VM86_ARG
(
res
);
rec
.
ExceptionInformation
[
0
]
=
VM86_ARG
(
res
);
break
;
break
;
case
VM86_STI
:
/* sti/popf/iret instruction enabled virtual interrupts */
case
VM86_STI
:
/* sti/popf/iret instruction enabled virtual interrupts */
context
->
EFlags
|=
VIF_
MASK
;
context
->
EFlags
|=
VIF_
FLAG
;
context
->
EFlags
&=
~
VIP_
MASK
;
context
->
EFlags
&=
~
VIP_
FLAG
;
get_vm86_teb_info
()
->
vm86_pending
=
0
;
get_vm86_teb_info
()
->
vm86_pending
=
0
;
rec
.
ExceptionCode
=
EXCEPTION_VM86_STI
;
rec
.
ExceptionCode
=
EXCEPTION_VM86_STI
;
break
;
break
;
...
...
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