Commit Graph

16 Commits

Author SHA1 Message Date
nathanw aa70f03b23 When implementing a recursive mutex, it helps if you remember to
decrement the recursion count.

Fixes the problem of uic dying with a no-next-thread assertion while
building kdeadmin3; reported by Perry Metzger and others on
tech-pkg.
2003-03-19 22:26:47 +00:00
thorpej 65ec6ba6e7 Fix lib/20558:
A dynamically linked program invokes the rtld cleanup routine via
an atexit handler.  This rtld cleanup routine invokes _fini() for
shared libraries, which in-turn invoke __cxa_finalize() with their
DSO handle.  By luck, this happens to work okay for non-threaded
programs, but for a threaded program, this leads to deadlock (sometimes
manifested as an assertion failure, if the program didn't actually
create any threads).

Fixed by teaching __cxa_finalize() that it can be recursively invoked,
adjusting the handler list manipulation accordingly.
2003-03-04 18:09:48 +00:00
thorpej 26be93fa6f Rewrite atexit(3), and add support for __cxa_atexit()/__cxa_finalize(),
as specified by the C++ ABI for Itanium.  Despite the ABI document's name,
many of the items in it are implemented for other architectures.

See the following URL for a reference:

	http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor

Fixes lib/18379 (from Joel Baker).
2003-03-01 04:19:37 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
kleink cd85b5e5ac Protect __atexit manipulation and traversal with a mutex. 1998-10-18 14:36:30 +00:00
perry c8bafd6265 remove obsolete register declarations 1998-02-03 18:38:12 +00:00
perry 5f8a6c06f3 update to lite-2 1998-01-30 23:37:40 +00:00
christos bd9067774f Add local.h for local prototypes.
Fix namespace issues for strtoq and strtouq
Fix gcc warnings.
Fix RCSID's
1997-07-13 20:16:31 +00:00
thorpej 6dda330ef6 New-style RCS ids. 1995-12-28 08:51:55 +00:00
jtc 6eaa1d60d8 define __atexit pointer 1995-06-14 05:17:53 +00:00
jtc 7cd5ae5858 remove unneeded "#include <stddef.h>" 1995-02-28 01:46:24 +00:00
jtc 9c20f740a3 Declare rcsid strings so they are stored in text segment. 1993-08-26 00:43:03 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00