From 081daf7d2148d183ff69093946ec8ca3dc405540 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sat, 31 Jul 1999 17:27:38 +0000 Subject: [PATCH] Implemented KERNEL.447 (WIN32_OldYield16). --- if1632/kernel.spec | 2 +- include/wine/winbase16.h | 1 + loader/task.c | 10 ++++++++++ windows/queue.c | 7 +------ 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/if1632/kernel.spec b/if1632/kernel.spec index 699748a8c4c..b930df5fa26 100644 --- a/if1632/kernel.spec +++ b/if1632/kernel.spec @@ -351,7 +351,7 @@ file krnl386.exe 444 pascal16 Local32Info(ptr word) Local32Info16 445 pascal16 Local32First(ptr word) Local32First16 446 pascal16 Local32Next(ptr) Local32Next16 -447 pascal16 KERNEL_447() KERNEL_nop +447 pascal16 WIN32_OldYield() WIN32_OldYield16 448 stub KERNEL_448 449 pascal GetpWin16Lock() GetpWin16Lock16 450 pascal VWin32_EventWait(long) VWin32_EventWait diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index ad37c023070..5876e2b4a67 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -93,6 +93,7 @@ HMODULE WINAPI LoadLibraryEx32W16(LPCSTR,HANDLE16,DWORD); FARPROC16 WINAPI LocalNotify16(FARPROC16); HTASK16 WINAPI LockCurrentTask16(BOOL16); VOID WINAPI OldYield16(void); +VOID WINAPI WIN32_OldYield16(void); VOID WINAPI PostEvent16(HTASK16); WORD WINAPI PrestoChangoSelector16(WORD,WORD); WORD WINAPI SelectorAccessRights16(WORD,WORD,WORD); diff --git a/loader/task.c b/loader/task.c index 601952e97c7..62f37a4b2e3 100644 --- a/loader/task.c +++ b/loader/task.c @@ -870,6 +870,16 @@ void WINAPI OldYield16(void) if (pCurTask) pCurTask->nEvents--; } +/*********************************************************************** + * WIN32_OldYield16 (KERNEL.447) + */ +void WINAPI WIN32_OldYield16(void) +{ + DWORD count; + + ReleaseThunkLock(&count); + RestoreThunkLock(count); +} /*********************************************************************** * DirectedYield (KERNEL.150) diff --git a/windows/queue.c b/windows/queue.c index 7c8afc63c70..e2275cd5977 100644 --- a/windows/queue.c +++ b/windows/queue.c @@ -1533,12 +1533,7 @@ void WINAPI UserYield16(void) if ( THREAD_IsWin16( NtCurrentTeb() ) ) OldYield16(); else - { - DWORD count; - - ReleaseThunkLock(&count); - RestoreThunkLock(count); - } + WIN32_OldYield16(); /* Handle sent messages again */ queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() );