mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 08:53:29 +00:00
Move Tid from Thread to PosixThread
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
ceb6e2b242
commit
81b0f265b5
@ -76,7 +76,7 @@ pub fn sys_timer_create(
|
||||
// Send a signal to the specified thread when the timer is expired.
|
||||
SigNotify::SIGEV_THREAD_ID => {
|
||||
let tid = sig_event.sigev_un.read_tid() as u32;
|
||||
let thread = thread_table::get_thread(tid).ok_or_else(|| {
|
||||
let thread = thread_table::get_posix_thread(tid).ok_or_else(|| {
|
||||
Error::with_message(Errno::EINVAL, "target thread does not exist")
|
||||
})?;
|
||||
let posix_thread = thread.as_posix_thread().unwrap();
|
||||
@ -132,7 +132,7 @@ pub fn sys_timer_create(
|
||||
}
|
||||
}
|
||||
DynamicClockIdInfo::Tid(tid, clock_type) => {
|
||||
let thread = thread_table::get_thread(tid)
|
||||
let thread = thread_table::get_posix_thread(tid)
|
||||
.ok_or_else(|| Error::with_message(Errno::EINVAL, "invalid clock id"))?;
|
||||
let posix_thread = thread.as_posix_thread().unwrap();
|
||||
match clock_type {
|
||||
|
Reference in New Issue
Block a user