Re: [HACKERS] Re: sched_yield()

From: Andrew Martin <martin(at)biochemistry(dot)ucl(dot)ac(dot)uk>
To: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: sched_yield()
Date: 1998-03-23 10:32:11
Message-ID: 199803231032.KAA26052@bsmir06.biochem.ucl.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.
>
>From the Irix6 man page:

#include <sched.h>
...
The sched_yield system call causes the calling process to relinquish the
processor to a runnable process of higher or equal priority.

Looks like it should work here, but needs a different header file from BDSI.

Andrew

----------------------------------------------------------------------------
Dr. Andrew C.R. Martin University College London
EMAIL: (Work) martin(at)biochem(dot)ucl(dot)ac(dot)uk (Home) andrew(at)stagleys(dot)demon(dot)co(dot)uk
URL: http://www.biochem.ucl.ac.uk/~martin
Tel: (Work) +44(0)171 419 3890 (Home) +44(0)1372 275775

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Farrell 1998-03-23 11:15:10 Re:
Previous Message Andrew Martin 1998-03-23 10:23:32 Re: [HACKERS] Re: sched_yield()