Skip to content
Snippets Groups Projects
Commit 9e7ee944 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

Allow creation of a new sched::thread pinned to a specific CPU.

Previously, we had the option to create a pinned thread, but it always
runs on the same CPU as the current thread, which is kind of odd. Changed
the boolean attribute "pinned" to a cpu* attribute specifying the cpu to
pin to.

Example code to run a start a new thread pinned on cpu 1:
new sched::thread([&]{...}, sched::thread::attr(sched::cpus[1]));

I need this feature to test the cross-CPU TLB flushing feature - I need
to be able to run two threads on two different CPUs.
parent 74ed795b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment