Mail Archives: djgpp/2001/05/05/12:30:59
Thanks for help :)
Raf256
----- Original Message -----
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Newsgroups: comp.os.msdos.djgpp
To: Rafal Maj <maj_rafal AT poczta DOT onet DOT pl>
Cc: <djgpp AT delorie DOT com>
Sent: Saturday, May 05, 2001 17:16
Subject: Re: busy-wait loop - djgpp_yeld
> > From: "Rafal Maj" <maj_rafal AT poczta DOT onet DOT pl>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Sat, 5 May 2001 11:35:35 +0200
> >
> > what functions should I all inside my busy-wait loop to make my program
nice
> > to other tasks ? How can I control "nice" level (Idle or realtime) ?
> > With function is most portable ?
> > And maybe some Allegro functions are better ?
> >
> > while (!finish) {
> > do_calculations();
> > djgpp_yeld(); // ?
> > rest(100); // ?
> > }
>
> That function is called __dpmi_yield in DJGPP.
>
> AFAIK, there's no portable function which accomplishes this function.
> If you can afford delaying the program a bit, call usleep or sleep,
> they both call __dpmi_yield internally, and should have similar
> effects on other multitasking OSes.
--
- Raw text -