Mail Archives: djgpp/1999/04/16/16:29:28
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 -