Re: sched_yield()

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: matti(at)algonet(dot)se (Mattias Kregert)
Cc: scrappy(at)hub(dot)org, dz(at)cs(dot)unitn(dot)it, hackers(at)postgreSQL(dot)org
Subject: Re: sched_yield()
Date: 1998-03-22 04:01:12
Message-ID: 199803220401.XAA02645@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Perhaps we should enable sched_yield() for every OS except for... well,
> what's the
> name of that OS which does not have sched_yield()... FreeBSD ;)
>
> After all, sched_yield() is five years old. Any reasonable OS should
> have it.

Gee, I just checked and BSDI has it. However, it appears to work only
on threaded applications:

#include <pthread.h>
...
If other threads are ready to run, the sched_yield() function forces the
current thread to suspend itself temporarily and let them execute.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-22 04:03:41 Re: [HACKERS] Re: sched_yield()
Previous Message The Hermit Hacker 1998-03-22 04:00:01 Re: [HACKERS] Re: sched_yield()