Page MenuHomeFreeBSD

RISC-V: Fix an alignment warning in libthr
ClosedPublic

Authored by mhorne on Oct 7 2019, 10:56 PM.
Tags
None
Referenced Files
F159177996: D21926.id63071.diff
Wed, Jun 10, 11:45 PM
Unknown Object (File)
Wed, Jun 10, 11:31 AM
Unknown Object (File)
Tue, Jun 9, 10:18 AM
Unknown Object (File)
May 11 2026, 5:38 PM
Unknown Object (File)
May 8 2026, 6:14 PM
Unknown Object (File)
May 1 2026, 9:07 PM
Unknown Object (File)
Apr 24 2026, 5:19 AM
Unknown Object (File)
Apr 20 2026, 1:30 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable