Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
887ed622
Commit
887ed622
authored
22 years ago
by
Jukka Heinonen
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Terminating DOS program in real mode now calls ExitThread which is
exactly what terminating in protected mode does.
parent
8a1ac6ed
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/winedos/dosexe.h
+1
-1
1 addition, 1 deletion
dlls/winedos/dosexe.h
dlls/winedos/dosvm.c
+14
-3
14 additions, 3 deletions
dlls/winedos/dosvm.c
dlls/winedos/module.c
+6
-11
6 additions, 11 deletions
dlls/winedos/module.c
with
21 additions
and
15 deletions
dlls/winedos/dosexe.h
+
1
−
1
View file @
887ed622
...
...
@@ -53,7 +53,7 @@ extern void WINAPI MZ_AllocDPMITask( void );
extern
void
WINAPI
MZ_RunInThread
(
PAPCFUNC
proc
,
ULONG_PTR
arg
);
extern
INT
WINAPI
DOSVM_Enter
(
CONTEXT86
*
context
);
extern
void
WINAPI
DOSVM_Wait
(
INT
read_pipe
,
HANDLE
hObject
);
extern
DWORD
WINAPI
DOSVM_Loop
(
LPVOID
lpExtra
);
extern
DWORD
WINAPI
DOSVM_Loop
(
HANDLE
hThread
);
extern
void
WINAPI
DOSVM_QueueEvent
(
INT
irq
,
INT
priority
,
DOSRELAY
relay
,
LPVOID
data
);
extern
void
WINAPI
DOSVM_PIC_ioport_out
(
WORD
port
,
BYTE
val
);
extern
void
WINAPI
DOSVM_SetTimer
(
UINT
ticks
);
...
...
This diff is collapsed.
Click to expand it.
dlls/winedos/dosvm.c
+
14
−
3
View file @
887ed622
...
...
@@ -370,19 +370,30 @@ chk_console_input:
}
while
(
TRUE
);
}
DWORD
WINAPI
DOSVM_Loop
(
LPVOID
lpExtra
)
DWORD
WINAPI
DOSVM_Loop
(
HANDLE
hThread
)
{
HANDLE
obj
=
GetStdHandle
(
STD_INPUT_HANDLE
)
;
HANDLE
obj
s
[
2
]
;
MSG
msg
;
DWORD
waitret
;
objs
[
0
]
=
GetStdHandle
(
STD_INPUT_HANDLE
);
objs
[
1
]
=
hThread
;
for
(;;)
{
TRACE_
(
int
)(
"waiting for action
\n
"
);
waitret
=
MsgWaitForMultipleObjects
(
1
,
&
obj
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
waitret
=
MsgWaitForMultipleObjects
(
2
,
obj
s
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
if
(
waitret
==
WAIT_OBJECT_0
)
{
DOSVM_ProcessConsole
();
}
else
if
(
waitret
==
WAIT_OBJECT_0
+
1
)
{
DWORD
rv
;
if
(
!
GetExitCodeThread
(
hThread
,
&
rv
))
{
ERR
(
"Failed to get thread exit code!
\n
"
);
rv
=
0
;
}
return
rv
;
}
else
if
(
waitret
==
WAIT_OBJECT_0
+
2
)
{
while
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
hwnd
)
{
/* it's a window message */
...
...
This diff is collapsed.
Click to expand it.
dlls/winedos/module.c
+
6
−
11
View file @
887ed622
...
...
@@ -94,7 +94,6 @@ static DWORD dosvm_tid, loop_tid;
static
void
MZ_Launch
(
void
);
static
BOOL
MZ_InitTask
(
void
);
static
void
MZ_KillTask
(
void
);
static
void
MZ_CreatePSP
(
LPVOID
lpPSP
,
WORD
env
,
WORD
par
)
{
...
...
@@ -474,6 +473,7 @@ static void MZ_Launch(void)
TDB
*
pTask
=
TASK_GetCurrent
();
BYTE
*
psp_start
=
PTR_REAL_TO_LIN
(
DOSVM_psp
,
0
);
LPSTR
cmdline
=
GetCommandLineA
();
DWORD
rv
;
MZ_FillPSP
(
psp_start
,
cmdline
,
cmdline
?
strlen
(
cmdline
)
:
0
);
pTask
->
flags
|=
TDBF_WINOLDAP
;
...
...
@@ -481,20 +481,15 @@ static void MZ_Launch(void)
_LeaveWin16Lock
();
ResumeThread
(
dosvm_thread
);
DOSVM_Loop
(
NULL
);
ExitThread
(
0
);
}
rv
=
DOSVM_Loop
(
dosvm_thread
);
static
void
MZ_KillTask
(
void
)
{
TRACE
(
"killing DOS task
\n
"
);
VGA_Clean
();
PostThreadMessageA
(
loop_tid
,
WM_QUIT
,
0
,
0
);
WaitForSingleObject
(
loop_thread
,
INFINITE
);
/* ? */
CloseHandle
(
dosvm_thread
);
dosvm_thread
=
0
;
dosvm_tid
=
0
;
CloseHandle
(
loop_thread
);
loop_thread
=
0
;
loop_tid
=
0
;
VGA_Clean
();
ExitThread
(
rv
);
}
/***********************************************************************
...
...
@@ -531,7 +526,7 @@ void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval )
context
->
Esp
=
OFFSETOF
(
psp
->
saveStack
);
return
;
}
else
MZ_KillTask
(
);
TRACE
(
"killing DOS task
\n
"
);
}
ExitThread
(
retval
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment