On Thu, Jan 31, 2008 at 02:32:45PM -0800, James Dennett wrote:
> > > Undefined                       first referenced
> > >  symbol                             in file
> > > sched_yield                         /var/tmp//cckDMcyL.o
> > > ld: fatal: Symbol referencing errors. No output written to
> > .libs/testfixture
> > 
> > So how does a thread yield its timeslice on solaris?
> 
> sched_yield is there, it just needs -lrt as it is considered part of the
> "Realtime Library Functions" according to its manpage.

Correct.

Note too that you can also use thr_yield(3C) (#include <thread.h>) or
even yield(2) (#include <unistd.h>).  All three functions yield only the
caller's thread's timeslice; sched_yield() and thr_yield() both end up
calling yield(2).

thr_yield(3C) and yield(2) live in libc, while sched_yield(3RT) lives in
librt.

Nico
-- 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to