freebsd-nq/libexec
John Polstra e6f0183bff Remove the nanosleep calls from the spin loops in the locking code.
They provided little benefit (if any) and they caused some problems
in OpenOffice, at least in post-KSE -current and perhaps in other
environments too.  The nanosleep calls prevented the profiling timer
from advancing during the spinloops, thereby preventing the thread
scheduler from ever pre-empting the spinning thread.  Alexander
Kabaev diagnosed this problem, Martin Blapp helped with testing,
and Matt Dillon provided some helpful suggestions.

This is a short-term fix for a larger problem.  The use of spinlocking
isn't guaranteed to work in all cases.  For example, if the spinning
thread has higher priority than all other threads, it may never be
pre-empted, and the thread holding the lock may never progress far
enough to release the lock.  On the other hand, spinlocking is the
only locking that can work with an arbitrary unknown threads package.

I have some ideas for a much better fix in the longer term.  It
would eliminate all locking inside the dynamic linker by making it
safe for symbol lookups and lazy binding to proceed in parallel
with a call to dlopen or dlclose.  This means that the only mutual
exclusion needed would be to prevent multiple simultaneous calls
to dlopen and/or dlclose.  That mutual exclusion could be put into
the native pthreads library.  Applications using foreign threads
packages would have to make their own arrangements to ensure that
they did not have multiple threads in dlopen and/or dlclose -- a
reasonable requirement in my opinion.

MFC after:	3 days
2002-07-06 20:25:56 +00:00
..
atrun Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00
bootpd The .Nm utility 2002-07-06 19:19:48 +00:00
comsat The .Nm utility 2002-07-06 19:19:48 +00:00
fingerd The .Nm utility 2002-07-06 19:19:48 +00:00
ftpd The .Nm utility 2002-07-06 19:19:48 +00:00
getNAME o __P removal 2002-02-06 16:38:40 +00:00
getty The .Nm utility 2002-07-06 19:19:48 +00:00
lukemftpd Fixed CLEANFILES. 2002-05-13 15:21:51 +00:00
mail.local Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
makekey The .Nm utility 2002-07-06 19:19:48 +00:00
mknetid The .Nm utility 2002-07-06 19:19:48 +00:00
named-xfer Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00
pppoed The .Nm utility 2002-07-06 19:19:48 +00:00
rbootd The .Nm utility 2002-07-06 19:19:48 +00:00
revnetgroup The .Nm utility 2002-07-06 19:19:48 +00:00
rexecd The .Nm utility 2002-07-06 19:19:48 +00:00
rlogind The .Nm utility 2002-07-06 19:19:48 +00:00
rpc.rquotad The .Nm utility 2002-07-06 19:19:48 +00:00
rpc.rstatd The .Nm utility 2002-07-06 19:19:48 +00:00
rpc.rusersd The .Nm utility 2002-07-06 19:19:48 +00:00
rpc.rwalld The .Nm utility 2002-07-06 19:19:48 +00:00
rpc.sprayd The .Nm utility 2002-07-06 19:19:48 +00:00
rshd The .Nm utility 2002-07-06 19:19:48 +00:00
rtld-aout Assume __STDC__, remove non-__STDC__ code. 2002-05-28 18:57:20 +00:00
rtld-elf Remove the nanosleep calls from the spin loops in the locking code. 2002-07-06 20:25:56 +00:00
save-entropy beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
smrsh Update build infrastructure for sendmail 8.12. 2002-02-17 22:05:07 +00:00
talkd The .Nm utility 2002-07-06 19:19:48 +00:00
tcpd Build the TCP-wrapper helper "daemon" tcpd. This is not much use in 2002-01-12 13:31:30 +00:00
telnetd The .Nm utility 2002-07-06 19:19:48 +00:00
tftpd The .Nm utility 2002-07-06 19:19:48 +00:00
xtend The .Nm utility 2002-07-06 19:19:48 +00:00
ypxfr The .Nm utility 2002-07-06 19:19:48 +00:00
Makefile Add lukemftpd to the mix. 2002-02-27 18:37:21 +00:00
Makefile.inc Lock down with WFORMAT?=1, with overrides in the subdirectories which 2002-02-04 02:33:51 +00:00