Page MenuHomeFreeBSD

Make cpu_set_user_tls() work when called on the running thread
ClosedPublic

Authored by ed on Aug 8 2016, 10:49 AM.

Details

Summary

On all the other architectures, this function can also be called on the currently running thread. In this case, we shouldn't fix up the address in the PCB, but also patch up the register itself. Otherwise it will not become active and will simply become overwritten by the next switch.

Test Plan

This unbreaks CloudABI support on aarch64 for me.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ed retitled this revision from to Make cpu_set_user_tls() work when called on the running thread.
ed updated this object.
ed edited the test plan for this revision. (Show Details)
ed added a reviewer: andrew.
ed set the repository for this revision to rS FreeBSD src repository - subversion.
imp added a reviewer: imp.

Looks good to my eye, based on what I know from my MIPS days, but consider this a weak 'yes'

This revision is now accepted and ready to land.Aug 10 2016, 3:39 PM
This revision was automatically updated to reflect the committed changes.