Skip to content

Support running no_core Linux programs#4964

Draft
saethlin wants to merge 1 commit intorust-lang:masterfrom
saethlin:support-no-core
Draft

Support running no_core Linux programs#4964
saethlin wants to merge 1 commit intorust-lang:masterfrom
saethlin:support-no-core

Conversation

@saethlin
Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added the S-waiting-on-author Status: Waiting for the PR author to address review comments label Apr 15, 2026
if matches!(&tcx.sess.target.os, Os::Linux | Os::FreeBsd | Os::Android) && !is_no_core(tcx)
{
thread_cpu_affinity
.insert(threads.active_thread(), CpuAffinityMask::new(&layout_cx, config.num_cpus));
Copy link
Copy Markdown
Member

@RalfJung RalfJung Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that if the program later calls sched_getaffinity it may get nonsensical errors about threads not existing.

Might be better to turn this into an Option<FxHashMap> so that we can leave it uninitialized and give proper errors in the shims that need it?

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: Waiting for the PR author to address review comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants