]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
RISC-V: Fix an alignment warning in libthr
authormhorne <mhorne@FreeBSD.org>
Wed, 9 Oct 2019 02:02:22 +0000 (02:02 +0000)
committermhorne <mhorne@FreeBSD.org>
Wed, 9 Oct 2019 02:02:22 +0000 (02:02 +0000)
commitab9141d24c35e2ed9a13d02ae6bb99e80df3bad7
tree37a927d8caab3e7dfa8791ab9d06b878c2deb3a4
parentc0d01c7f47e58e61cb9185fbb9ce836c6cbf0910
RISC-V: Fix an alignment warning in libthr

Compiling with clang gives a loss-of-alignment error due the cast to
uint8_t *. Since the TLS is always tcb aligned and TP_OFFSET is defined
as sizeof(struct tcb) we can guarantee there is no misalignment. Silence
the error by moving the offset into the inline assembly.

Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21926
lib/libthr/arch/riscv/include/pthread_md.h