Page MenuHomeFreeBSD

RISC-V: Fix an alignment warning in libthr
ClosedPublic

Authored by mhorne on Mon, Oct 7, 10:56 PM.

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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mhorne created this revision.Mon, Oct 7, 10:56 PM
mhorne updated this revision to Diff 63036.Tue, Oct 8, 12:50 PM

Fix whitespace.

br accepted this revision.Tue, Oct 8, 1:01 PM
This revision is now accepted and ready to land.Tue, Oct 8, 1:01 PM
This revision was automatically updated to reflect the committed changes.