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
e54d4d15
Commit
e54d4d15
authored
May 22, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
May 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added MZ_Current() (returns current LPDOSTASK) and DOSVM_Wait()
(DOSVM idle message loop), and fields hConInput and hConOutput.
parent
8903e536
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
11 deletions
+34
-11
dosexe.h
include/dosexe.h
+3
-1
dosvm.c
loader/dos/dosvm.c
+0
-0
module.c
loader/dos/module.c
+31
-10
No files found.
include/dosexe.h
View file @
e54d4d15
...
...
@@ -30,7 +30,7 @@ typedef struct _DOSTASK {
HMODULE16
hModule
;
char
mm_name
[
128
];
int
mm_fd
;
HANDLE
hReadPipe
,
hXPipe
;
HANDLE
hReadPipe
,
hXPipe
,
hConInput
,
hConOutput
;
int
read_pipe
,
write_pipe
;
pid_t
task
;
int
sig_sent
;
...
...
@@ -67,7 +67,9 @@ extern BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
BOOL
inherit
,
LPSTARTUPINFOA
startup
,
LPPROCESS_INFORMATION
info
);
extern
LPDOSTASK
MZ_Current
(
void
);
extern
int
DOSVM_Enter
(
PCONTEXT
context
);
extern
void
DOSVM_Wait
(
int
read_pipe
,
HANDLE
hObject
);
extern
void
DOSVM_QueueEvent
(
int
irq
,
int
priority
,
void
(
*
relay
)(
LPDOSTASK
,
PCONTEXT
,
void
*
),
void
*
data
);
extern
void
DOSVM_PIC_ioport_out
(
WORD
port
,
BYTE
val
);
extern
void
DOSVM_SetTimer
(
unsigned
ticks
);
...
...
loader/dos/dosvm.c
View file @
e54d4d15
This diff is collapsed.
Click to expand it.
loader/dos/module.c
View file @
e54d4d15
...
...
@@ -182,7 +182,7 @@ static BOOL MZ_InitMemory( LPDOSTASK lpDosTask, NE_MODULE *pModule )
{
int
x
;
if
(
lpDosTask
->
img
_ofs
)
return
TRUE
;
/* already allocated */
if
(
lpDosTask
->
img
)
return
TRUE
;
/* already allocated */
/* allocate 1MB+64K shared memory */
lpDosTask
->
img_ofs
=
START_OFFSET
;
...
...
@@ -330,7 +330,7 @@ static void MZ_InitTimer( LPDOSTASK lpDosTask, int ver )
int
func
;
struct
timeval
tim
;
/* start dosmod timer at 55
Hz
*/
/* start dosmod timer at 55
ms (18.2Hz)
*/
func
=
DOSMOD_SET_TIMER
;
tim
.
tv_sec
=
0
;
tim
.
tv_usec
=
54925
;
write
(
lpDosTask
->
write_pipe
,
&
func
,
sizeof
(
func
));
...
...
@@ -370,14 +370,17 @@ BOOL MZ_InitTask( LPDOSTASK lpDosTask )
lpDosTask
->
write_pipe
=
write_fd
[
1
];
/* if we have a mapping file, use it */
fname
=
lpDosTask
->
mm_name
;
farg
=
NULL
;
if
(
!
fname
[
0
])
{
/* otherwise, map our own memory image */
sprintf
(
fproc
,
"/proc/%d/mem"
,
getpid
());
sprintf
(
arg
,
"%ld"
,(
unsigned
long
)
lpDosTask
->
img
);
fname
=
fproc
;
farg
=
arg
;
}
lpDosTask
->
hConInput
=
GetStdHandle
(
STD_INPUT_HANDLE
);
lpDosTask
->
hConOutput
=
GetStdHandle
(
STD_OUTPUT_HANDLE
);
/* if we have a mapping file, use it */
fname
=
lpDosTask
->
mm_name
;
farg
=
NULL
;
if
(
!
fname
[
0
])
{
/* otherwise, map our own memory image */
sprintf
(
fproc
,
"/proc/%d/mem"
,
getpid
());
sprintf
(
arg
,
"%ld"
,(
unsigned
long
)
lpDosTask
->
img
);
fname
=
fproc
;
farg
=
arg
;
}
TRACE
(
module
,
"Loading DOS VM support module (hmodule=%04x)
\n
"
,
lpDosTask
->
hModule
);
if
((
child
=
fork
())
<
0
)
{
...
...
@@ -541,6 +544,19 @@ void MZ_KillModule( LPDOSTASK lpDosTask )
#endif
}
LPDOSTASK
MZ_Current
(
void
)
{
TDB
*
pTask
=
(
TDB
*
)
GlobalLock16
(
GetCurrentTask
()
);
NE_MODULE
*
pModule
=
pTask
?
NE_GetPtr
(
pTask
->
hModule
)
:
NULL
;
GlobalUnlock16
(
GetCurrentTask
()
);
if
(
pModule
)
return
pModule
->
lpDosTask
;
return
NULL
;
}
#else
/* !MZ_SUPPORTED */
BOOL
MZ_CreateProcess
(
HFILE
hFile
,
OFSTRUCT
*
ofs
,
LPCSTR
cmdline
,
LPCSTR
env
,
...
...
@@ -553,4 +569,9 @@ BOOL MZ_CreateProcess( HFILE hFile, OFSTRUCT *ofs, LPCSTR cmdline, LPCSTR env,
return
FALSE
;
}
LPDOSTASK
*
MZ_Current
(
void
)
{
return
NULL
;
}
#endif
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