Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store thread name #91

Closed
jethrogb opened this issue Feb 4, 2019 · 2 comments
Closed

Store thread name #91

jethrogb opened this issue Feb 4, 2019 · 2 comments
Assignees
Labels
enhancement Intel SGX std/rustc Requires changes in Rust std/rustc
Milestone

Comments

@jethrogb
Copy link
Member

jethrogb commented Feb 4, 2019

libstd/sys/sgx/thread.rs

    pub fn set_name(_name: &CStr) {
        // FIXME: could store this pointer in TLS somewhere
    }
@vn971
Copy link

vn971 commented Jun 15, 2023

PR: rust-lang/rust#112646

As a result of the investigation, I've concluded that the issue is a result of a wrong assumption:
It was thought that the thread name needs to be saved in the method Thread::set_name. However, it seems that this method has a very different purpose: it signals the platform-specific (target-specific) code to set the thread name in the operating system.
However, in SGX, there is no strict concept of an operating system thread name. And the name of the thread, as visible inside SGX, is already stored by the platform-agnostic Rust code.
Therefore, the only action to take here is to document the situation and remove the FIXME marker.

@jethrogb
Copy link
Member Author

Apparently already implemented

@BelalH BelalH added this to the Seeds milestone Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Intel SGX std/rustc Requires changes in Rust std/rustc
Projects
None yet
Development

No branches or pull requests

5 participants