source: trunk/src/win32k/misc/yield.c

Last change on this file was 1678, checked in by bird, 26 years ago

Some bugsfixes - Yield is disabled.
Added parameters.
Correcte moduleheaders.
Introduced a new base class for virtual lx modules + some elf sketches.

File size: 1.3 KB
RevLine 
[1678]1/* $Id: yield.c,v 1.4 1999-11-10 01:45:37 bird Exp $
[1272]2 *
[847]3 * Yield - conversion may take some time. So it is necessary to
4 * check it's time to yield the processor to other processes.
5 *
6 * Copyright (c) 1998-1999 knut st. osmundsen
7 *
[1678]8 * Project Odin Software License can be found in LICENSE.TXT
9 *
[847]10 */
11
12/*******************************************************************************
13* Defined Constants *
14*******************************************************************************/
15#define INCL_DOSERRORS
16#define INCL_NOAPI
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#include <os2.h>
22
23#include "dev32.h"
24#include "dev32hlp.h"
25#include "yield.h"
26
27
28/**
29 * Checks if we have to yield the CPU. Yield it if we must.
30 */
[1535]31BOOL Yield(void)
[847]32{
[1678]33 #if 0 /* Don't work on SMP and may cause trouble with logging at all machines... */
[847]34 PBYTE pfbYield;
35
36 pfbYield = D32Hlp_GetDOSVar(DHGETDOSV_YIELDFLAG, 0UL);
37 if (pfbYield != NULL && *pfbYield)
[1535]38 {
[847]39 D32Hlp_Yield();
[1535]40 return TRUE;
41 }
[1678]42 #endif
[1535]43 return FALSE;
[847]44}
Note: See TracBrowser for help on using the repository browser.