delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/05/12:30:59

Message-ID: <000f01c0d57d$48484ce0$64c8c8c8@rafek>
From: "Rafal Maj" <maj_rafal AT poczta DOT onet DOT pl>
To: <djgpp AT delorie DOT com>
References: <9d0i9v$hdv$1 AT info DOT cyf-kr DOT edu DOT pl> <2950-Sat05May2001181653+0300-eliz AT is DOT elta DOT co DOT il>
Subject: Odp: busy-wait loop - djgpp_yeld
Date: Sat, 5 May 2001 18:06:01 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019