Subject: sched_yield() and relinquishing CPU
To: NetBSD-Help <netbsd-help@netbsd.org>
From: Dan MacLean <dmaclean82@gmail.com>
List: netbsd-help
Date: 07/05/2005 16:16:43
------=_Part_5258_22389650.1120594603043
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
A program I am writing is currently having a problem with relinquishing the=
=20
CPU to other processes. The only thing I've found thus far to do something=
=20
like this is the sched_yield() call. However, the manual page states that=
=20
this will only give control of the CPU to another thread within the same=20
process. Since my program is a single thread, this does nothing. Are there=
=20
any other system calls that will give up the CPU to another process, instea=
d=20
of simply another thread within the same process? Or perhaps does anyone=20
know of a workaround that will accomplish the same thing?
-Dan MacLean
------=_Part_5258_22389650.1120594603043
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
A program I am writing is currently having a problem with relinquishing
the CPU to other processes. The only thing I've found thus far to
do something like this is the sched_yield() call. However, the
manual page states that this will only give control of the CPU to
another thread within the same process. Since my program is a
single thread, this does nothing. Are there any other system
calls that will give up the CPU to another process, instead of simply
another thread within the same process? Or perhaps does anyone
know of a workaround that will accomplish the same thing?<br>
<br>
-Dan MacLean<br>
<br>
------=_Part_5258_22389650.1120594603043--