mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-29 06:47:21 +01:00
20fe2c9465
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
60 lines
943 B
Makefile
60 lines
943 B
Makefile
# $FreeBSD$
|
|
|
|
# thr sources
|
|
.PATH: ${.CURDIR}/thread
|
|
|
|
SRCS+= \
|
|
thr_affinity.c \
|
|
thr_attr.c \
|
|
thr_barrier.c \
|
|
thr_barrierattr.c \
|
|
thr_cancel.c \
|
|
thr_clean.c \
|
|
thr_concurrency.c \
|
|
thr_cond.c \
|
|
thr_condattr.c \
|
|
thr_create.c \
|
|
thr_ctrdtr.c \
|
|
thr_detach.c \
|
|
thr_equal.c \
|
|
thr_event.c \
|
|
thr_exit.c \
|
|
thr_fork.c \
|
|
thr_getprio.c \
|
|
thr_getcpuclockid.c \
|
|
thr_getschedparam.c \
|
|
thr_getthreadid_np.c \
|
|
thr_info.c \
|
|
thr_init.c \
|
|
thr_join.c \
|
|
thr_list.c \
|
|
thr_kern.c \
|
|
thr_kill.c \
|
|
thr_main_np.c \
|
|
thr_multi_np.c \
|
|
thr_mutex.c \
|
|
thr_mutexattr.c \
|
|
thr_once.c \
|
|
thr_printf.c \
|
|
thr_pspinlock.c \
|
|
thr_resume_np.c \
|
|
thr_rtld.c \
|
|
thr_rwlock.c \
|
|
thr_rwlockattr.c \
|
|
thr_self.c \
|
|
thr_sem.c \
|
|
thr_setprio.c \
|
|
thr_setschedparam.c \
|
|
thr_sig.c \
|
|
thr_single_np.c \
|
|
thr_sleepq.c \
|
|
thr_spec.c \
|
|
thr_spinlock.c \
|
|
thr_stack.c \
|
|
thr_syscalls.c \
|
|
thr_suspend_np.c \
|
|
thr_switch_np.c \
|
|
thr_symbols.c \
|
|
thr_umtx.c \
|
|
thr_yield.c
|