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

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

Updated option/argument handling.
Corrected a few bugs.

File size: 1.1 KB
Line 
1/* $Id: yield.c,v 1.3 1999-10-31 23:57:08 bird Exp $
2 *
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 *
8 */
9
10/*******************************************************************************
11* Defined Constants *
12*******************************************************************************/
13#define INCL_DOSERRORS
14#define INCL_NOAPI
15
16/*******************************************************************************
17* Header Files *
18*******************************************************************************/
19#include <os2.h>
20
21#include "dev32.h"
22#include "dev32hlp.h"
23#include "yield.h"
24
25
26/**
27 * Checks if we have to yield the CPU. Yield it if we must.
28 */
29BOOL Yield(void)
30{
31 PBYTE pfbYield;
32
33 pfbYield = D32Hlp_GetDOSVar(DHGETDOSV_YIELDFLAG, 0UL);
34 if (pfbYield != NULL && *pfbYield)
35 {
36 D32Hlp_Yield();
37 return TRUE;
38 }
39
40 return FALSE;
41}
Note: See TracBrowser for help on using the repository browser.