[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: How to yield control of the thread in Hp-UX
From:       "Rich Rauenzahn" <rrauenza () cup ! hp ! com>
Date:       2004-01-21 17:31:19
Message-ID: 14ae01c3e044$61b00770$951ff40f () RAUENZAHNRICH
[Download RAW message or body]

From: "Dennis Handly" <dhandly@cup.hp.com>
To: <hpux-devtools@cxx.cup.hp.com>
Sent: Tuesday, January 20, 2004 10:56 PM
Subject: Re: HPUX-DEVTOOLS: How to yield control of the thread in Hp-UX


> >Same way -- my understanding is the man page is just out of date.
> Rich
> 
> Hmm, I know there was a pthread_yield in Draft 4.  But I never knew what
> its replacement was.  I assumed we had to call nanosleep(2).

I don't know how nanosleep compares to using select() to sleep for a small 
amount of time, but I once greatly increased an applications performance
by switching it from the sleep to sched_yield()...

nanosleep may have a better granularity, but select() was killing them. 
Their critical section was pretty small, too, from what I understood.

> Ah, the 11.23 manpage says:
>    Requeue current thread in thread list.

Ah!  Someone updated the docs! =-)

Rich
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic