delorie.com/djgpp/doc/libc/libc_279.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

__dpmi_yield

Syntax

 
#include <dpmi.h>

void __dpmi_yield(void);

Description

__dpmi_yield calls function 1680h of the interrupt 2Fh, which tells the task manager in a multitasking environment that the calling program doesn't need the rest of its time slice. The task manager will then preempt the calling program and switch to another task that is ready to run.

This function should be called in busy-wait loops, like when a program waits for user input via keyboard, after it finds the keyboard buffer empty, to enhance overall performance in a multitasking environment.

Return Value

None. If the call isn't supported by the environment, like when running on plain DOS, errno is set to ENOSYS.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004