delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/16/16:29:28

Message-ID: <3717AB7B.5D1A8C5A@lycosmail.com>
Date: Fri, 16 Apr 1999 17:28:27 -0400
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: __dpmi_yield
References: <37163891 DOT 2251F69B AT lycosmail DOT com> <37164838 DOT CD4A76F0 AT cartsys DOT com>
Reply-To: djgpp AT delorie DOT com

Nate Eldredge wrote:

> Adam Schrotenboer wrote:
> >
> > I know that __dpmi_yield is non portable, but is there an equivalent on
> > Linux systems????
> >
> > Maybe DJGPP should include that function, probably just as a macro that
> > calls __dpmi_yield, anyway, just a suggestion. I'm much more interested
> > in the above q.
>
> See sched_yield.
>
> We could implement it, but I suspect that most who use it also use the
> rest of the sched_* POSIX scheduler control functions, which are
> probably not reasonable for DJGPP to implement.
>
> On some systems, but I think not Linux, sleep(0) yields the current
> timeslice.
>
> But in general, if you need it, you're probably polling for some event,
> which is probably a bad idea.  What is it you're trying to do?
> --
>
> Nate Eldredge
> nate AT cartsys DOT com

I mostly use it in kbd input loops, or 'press a key to continue' loops. Why
is this bad???, especially if the program has nothing better to do?

- Raw text -


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