httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Ghent <>
Subject Re: 1.3 weirdness with AcceptMutex on Solaris
Date Thu, 31 Jan 2002 23:07:40 GMT
On 31 Jan 2002, Jeff Trawick wrote:

| Dale Ghent <> writes:
| > On 31 Jan 2002, Jeff Trawick wrote:
| >
| > | We turn on HAVE_PTHREAD_SERIALIZED_ACCEPT in src/include/ap_config.h
| > | for Solaris.  We do not add -lpthread to the link.
| > |
| > | That doesn't look good.
| > |
| > | Can anyone confirm?
| >
| > Yeah, I see that, too. I have to add '-lthread -lpthread' to the
| > src/Makefile manually.
| And for the $10,000 question...  What happens if you don't add those
| libraries?  On Solaris 8 I've never seen the link actually fail.

Yeah, libc(3LIB) does say it contains the thr_* and pthread_* calls, as
well as fork1(2), but the difference between the libc and lib*thread
implementations is not apparent from looking at the man pages for those

>From looking at patch descriptions, it seems that thread-related fixes are
in libthread for the most part (libpthread basically provides pthread_*
wrappers for what's in libthread... that's why those two libs are always
linked together in pthread programs.)

I found this blurb on that explains the presence of
the pthreaded functions in libc:

"All calls to libthread and libpthread are no-ops if the application does
not link -lthread or -lpthread. The runtime library libc has many
predefined libthread and libpthread stubs that are null procedures. True
procedures are interposed by libthread or libpthread when the application
links both libc and the thread library."


View raw message