mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Move Tid from Thread to PosixThread
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ceb6e2b242
commit
81b0f265b5
@ -13,6 +13,14 @@ use crate::{
|
||||
thread::{Thread, Tid},
|
||||
};
|
||||
pub trait PosixThreadExt {
|
||||
/// Returns the thread id.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// If the thread is not posix thread, this method will panic.
|
||||
fn tid(&self) -> Tid {
|
||||
self.as_posix_thread().unwrap().tid()
|
||||
}
|
||||
fn as_posix_thread(&self) -> Option<&PosixThread>;
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn new_posix_thread_from_executable(
|
||||
|
Reference in New Issue
Block a user