diff options
author | andrew <andrew@FreeBSD.org> | 2015-01-21 16:41:05 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2015-01-21 16:41:05 +0000 |
commit | 4721e5b10a6394debc054efdb295af2478d19b08 (patch) | |
tree | dd5374699dfdf6f807d4665c6b7b1da3ccf9760e /lib/libthr/thread/Makefile.inc | |
parent | ef36961ce12e25e2c86a5013a6ed33b650af51fb (diff) | |
download | FreeBSD-src-4721e5b10a6394debc054efdb295af2478d19b08.zip FreeBSD-src-4721e5b10a6394debc054efdb295af2478d19b08.tar.gz |
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
Diffstat (limited to 'lib/libthr/thread/Makefile.inc')
-rw-r--r-- | lib/libthr/thread/Makefile.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/Makefile.inc b/lib/libthr/thread/Makefile.inc index ddde6e9..1a7c63d 100644 --- a/lib/libthr/thread/Makefile.inc +++ b/lib/libthr/thread/Makefile.inc @@ -14,6 +14,7 @@ SRCS+= \ thr_cond.c \ thr_condattr.c \ thr_create.c \ + thr_ctrdtr.c \ thr_detach.c \ thr_equal.c \ thr_event.c \ |