Commit cf6f12f3 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Added RunInThread callout to winedos.

parent 309ed4e1
......@@ -421,6 +421,11 @@ LPDOSTASK WINAPI MZ_AllocDPMITask( void )
return lpDosTask;
}
void WINAPI MZ_RunInThread( PAPCFUNC proc, ULONG_PTR arg )
{
proc(arg);
}
static void MZ_InitTimer( int ver )
{
if (ver<1) {
......
......@@ -12,6 +12,7 @@ debug_channels (int module relay)
@ stdcall LoadDosExe(str long) MZ_LoadImage
@ stdcall Exec(ptr str long ptr) MZ_Exec
@ stdcall Exit(ptr long long) MZ_Exit
@ stdcall RunInThread(ptr long) MZ_RunInThread
@ stdcall Enter(ptr) DOSVM_Enter
@ stdcall Wait(long long) DOSVM_Wait
......
......@@ -37,11 +37,13 @@ typedef struct {
BOOL WINAPI (*Exec)( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID paramblk );
void WINAPI (*Exit)( CONTEXT86 *context, BOOL cs_psp, WORD retval );
int WINAPI (*Enter)( CONTEXT86 *context );
void WINAPI (*RunInThread)( PAPCFUNC proc, ULONG_PTR arg );
void WINAPI (*Wait)( int read_pipe, HANDLE hObject );
void WINAPI (*QueueEvent)( int irq, int priority, void (*relay)(CONTEXT86*,void*), void *data );
void WINAPI (*OutPIC)( WORD port, BYTE val );
void WINAPI (*SetTimer)( unsigned ticks );
unsigned WINAPI (*GetTimer)( void );
BYTE WINAPI (*KbdReadScan)( BYTE *ascii );
} DOSVM_TABLE;
extern DOSVM_TABLE Dosvm;
......
......@@ -37,8 +37,10 @@ extern BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVO
extern void WINAPI MZ_Exit( CONTEXT86 *context, BOOL cs_psp, WORD retval );
extern LPDOSTASK WINAPI MZ_Current( void );
extern LPDOSTASK 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 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 );
......
......@@ -80,17 +80,19 @@ BOOL DPMI_LoadDosSystem(void)
ERR("could not load winedos.dll, DOS subsystem unavailable\n");
return FALSE;
}
Dosvm.Current = (void *)GetProcAddress(DosModule, "GetCurrent");
Dosvm.LoadDPMI = (void *)GetProcAddress(DosModule, "LoadDPMI");
Dosvm.LoadDosExe = (void *)GetProcAddress(DosModule, "LoadDosExe");
Dosvm.Exec = (void *)GetProcAddress(DosModule, "Exec");
Dosvm.Exit = (void *)GetProcAddress(DosModule, "Exit");
Dosvm.Enter = (void *)GetProcAddress(DosModule, "Enter");
Dosvm.Wait = (void *)GetProcAddress(DosModule, "Wait");
Dosvm.QueueEvent = (void *)GetProcAddress(DosModule, "QueueEvent");
Dosvm.OutPIC = (void *)GetProcAddress(DosModule, "OutPIC");
Dosvm.SetTimer = (void *)GetProcAddress(DosModule, "SetTimer");
Dosvm.GetTimer = (void *)GetProcAddress(DosModule, "GetTimer");
Dosvm.Current = (void *)GetProcAddress(DosModule, "GetCurrent");
Dosvm.LoadDPMI = (void *)GetProcAddress(DosModule, "LoadDPMI");
Dosvm.LoadDosExe = (void *)GetProcAddress(DosModule, "LoadDosExe");
Dosvm.Exec = (void *)GetProcAddress(DosModule, "Exec");
Dosvm.Exit = (void *)GetProcAddress(DosModule, "Exit");
Dosvm.Enter = (void *)GetProcAddress(DosModule, "Enter");
Dosvm.RunInThread = (void *)GetProcAddress(DosModule, "RunInThread");
Dosvm.Wait = (void *)GetProcAddress(DosModule, "Wait");
Dosvm.QueueEvent = (void *)GetProcAddress(DosModule, "QueueEvent");
Dosvm.OutPIC = (void *)GetProcAddress(DosModule, "OutPIC");
Dosvm.SetTimer = (void *)GetProcAddress(DosModule, "SetTimer");
Dosvm.GetTimer = (void *)GetProcAddress(DosModule, "GetTimer");
Dosvm.KbdReadScan = (void *)GetProcAddress(DosModule, "KbdReadScan");
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment