freebsd-skq/lib/libthr
Andrew Turner 20fe2c9465 Merge all the copies of _tcb_ctor and _tcb_dtor.
The amd64, i386, and sparc64 versions were identical, with the one
difference where the former two used inline asm instead of _tcb_get. I
have compared the function before and after replacing the asm with _tcb_get
and found the object files to be identical.

The arm, mips, and powerpc versions were almost identical. The only
difference was the powerpc version used an alignment of 1 where arm and
mips used 16. As this is an increase in alignment is will be safe.

Along with this arm, mips, and powerpc all passed, when initial was true,
the value returned from _tcb_get as the first argument to
_rtld_allocate_tls. This would then return this pointer back to the caller.
We can remove these extra calls by checking if initial is set and setting
the thread control block directly. As this is what the sparc64 code does
we can use it directly.

As after these observations all the architectures can now have identical
code we can merge them into a common file.

Differential Revision:	https://reviews.freebsd.org/D1556
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2015-01-21 16:41:05 +00:00
..
arch Merge all the copies of _tcb_ctor and _tcb_dtor. 2015-01-21 16:41:05 +00:00
support Merge from tbemd, with a small amount of rework: 2010-09-13 01:43:10 +00:00
sys Fix known issues which blow up the process after dlopen("libthr.so") 2015-01-03 18:38:46 +00:00
tests Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as 2014-11-16 06:35:20 +00:00
thread Merge all the copies of _tcb_ctor and _tcb_dtor. 2015-01-21 16:41:05 +00:00
libthr.3 Fix description of mutex acquisition. 2014-09-26 04:33:27 +00:00
Makefile Merge all the copies of _tcb_ctor and _tcb_dtor. 2015-01-21 16:41:05 +00:00
Makefile.amd64 Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as 2014-11-16 06:35:20 +00:00
Makefile.i386 Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as 2014-11-16 06:35:20 +00:00
plockstat.d Add the DTrace probe definitions for plockstat support. 2014-07-05 19:49:31 +00:00
pthread.map Fix known issues which blow up the process after dlopen("libthr.so") 2015-01-03 18:38:46 +00:00