apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: cvs commit: apr/threadproc/unix thread.c
Date Fri, 03 Aug 2001 03:25:33 GMT
On Thu, Aug 02, 2001 at 07:46:38PM -0700, Ian Holsman wrote:
> just a note for the person wanting to implement this in unix.
> in linux .. pthread_yield would be OK.
> in solaris thr_yield should be used (as pthread_yield isn't defined, and 
> posix threads are implemented onto of LWP threads )
> Justin/Aaron ???

We'd probably want sched_yield as this is what POSIX.1b (aka POSIX.4)

FWIW, I think implementing this flies in the face of the OS scheduler 
(and on Solaris, the user scheduler which handles the LWP threads).  
The OS should do all of this for us.  NetWare seems to have a poor 
scheduler, so it needs a little help.

Unless someone can show a win on Unix, I'd rather see this left
unimplemented.  It should almost be #define to NULL on Unix rather 
than an empty function (so the compiler can easily optimize it out).

My problem isn't with this call, but with the use of this call.
Since I believe the NetWare guys intend to sprinkle this throughout 
the httpd code, I'd like to make sure that this code is a no-op on
Unix.  If someone can show where this is a win with a good OS 
scheduler, I'd love to hear about it.  I'm not seeing the advantage.
-- justin

View raw message