Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c5bdfdfb
Commit
c5bdfdfb
authored
Mar 31, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Release the 16-bit lock before calling ExitThread.
This avoids deadlocks with the loader lock.
parent
a6aa7771
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
7 deletions
+20
-7
dosexe.h
dlls/winedos/dosexe.h
+1
-0
int21.c
dlls/winedos/int21.c
+2
-2
int31.c
dlls/winedos/int31.c
+2
-2
interrupts.c
dlls/winedos/interrupts.c
+1
-1
module.c
dlls/winedos/module.c
+14
-2
No files found.
dlls/winedos/dosexe.h
View file @
c5bdfdfb
...
...
@@ -352,6 +352,7 @@ extern BOOL WINAPI MZ_Current( void );
extern
void
WINAPI
MZ_AllocDPMITask
(
void
);
extern
void
WINAPI
MZ_RunInThread
(
PAPCFUNC
proc
,
ULONG_PTR
arg
);
extern
BOOL
DOSVM_IsWin16
(
void
);
extern
void
DOSVM_Exit
(
WORD
retval
);
/* dosvm.c */
extern
void
DOSVM_SendQueuedEvents
(
CONTEXT86
*
);
...
...
dlls/winedos/int21.c
View file @
c5bdfdfb
...
...
@@ -4176,7 +4176,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
case
0x00
:
/* TERMINATE PROGRAM */
TRACE
(
"TERMINATE PROGRAM
\n
"
);
if
(
DOSVM_IsWin16
())
ExitThread
(
0
);
DOSVM_Exit
(
0
);
else
if
(
ISV86
(
context
))
MZ_Exit
(
context
,
FALSE
,
0
);
else
...
...
@@ -5050,7 +5050,7 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
case
0x4c
:
/* "EXIT" - TERMINATE WITH RETURN CODE */
TRACE
(
"EXIT with return code %d
\n
"
,
AL_reg
(
context
)
);
if
(
DOSVM_IsWin16
())
ExitThread
(
AL_reg
(
context
)
);
DOSVM_Exit
(
AL_reg
(
context
)
);
else
if
(
ISV86
(
context
))
MZ_Exit
(
context
,
FALSE
,
AL_reg
(
context
)
);
else
...
...
dlls/winedos/int31.c
View file @
c5bdfdfb
...
...
@@ -626,11 +626,11 @@ static void StartPM( CONTEXT86 *context )
TRACE
(
"Protected mode DOS program is terminating
\n
"
);
/*
* FIXME: Instead of calling
ExitThread
, we should release all
* FIXME: Instead of calling
DOSVM_Exit
, we should release all
* allocated protected mode resources and call MZ_Exit
* using real mode context. See DPMI specification.
*/
ExitThread
(
DPMI_retval
);
DOSVM_Exit
(
DPMI_retval
);
#if 0
wine_ldt_free_entries( psp->environment, 1 );
...
...
dlls/winedos/interrupts.c
View file @
c5bdfdfb
...
...
@@ -951,7 +951,7 @@ static void WINAPI DOSVM_Int1aHandler( CONTEXT86 *context )
static
void
WINAPI
DOSVM_Int20Handler
(
CONTEXT86
*
context
)
{
if
(
DOSVM_IsWin16
())
ExitThread
(
0
);
DOSVM_Exit
(
0
);
else
if
(
ISV86
(
context
))
MZ_Exit
(
context
,
TRUE
,
0
);
else
...
...
dlls/winedos/module.c
View file @
c5bdfdfb
...
...
@@ -64,6 +64,18 @@ BOOL DOSVM_IsWin16(void)
return
DOSVM_isdosexe
?
FALSE
:
TRUE
;
}
/**********************************************************************
* DOSVM_Exit
*/
void
DOSVM_Exit
(
WORD
retval
)
{
DWORD
count
;
ReleaseThunkLock
(
&
count
);
ExitThread
(
retval
);
}
#ifdef MZ_SUPPORTED
#ifdef HAVE_SYS_MMAN_H
...
...
@@ -731,7 +743,7 @@ void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval )
}
else
TRACE
(
"killing DOS task
\n
"
);
}
ExitThread
(
retval
);
DOSVM_Exit
(
retval
);
}
...
...
@@ -785,7 +797,7 @@ void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg )
*/
void
WINAPI
MZ_Exit
(
CONTEXT86
*
context
,
BOOL
cs_psp
,
WORD
retval
)
{
ExitThread
(
retval
);
DOSVM_Exit
(
retval
);
}
/***********************************************************************
...
...
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