mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 02:13:24 +00:00
Make task store Arc<Thread> and process store Arc<Task>
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
81b0f265b5
commit
f3174dbbbc
@ -86,16 +86,9 @@ impl Pause for Waiter {
|
||||
return Ok(res);
|
||||
}
|
||||
|
||||
let current_thread = self
|
||||
.task()
|
||||
.data()
|
||||
.downcast_ref::<Weak<Thread>>()
|
||||
.and_then(|thread| thread.upgrade());
|
||||
let current_thread = self.task().data().downcast_ref::<Arc<Thread>>();
|
||||
|
||||
let Some(posix_thread) = current_thread
|
||||
.as_ref()
|
||||
.and_then(|thread| thread.as_posix_thread())
|
||||
else {
|
||||
let Some(posix_thread) = current_thread.and_then(|thread| thread.as_posix_thread()) else {
|
||||
if let Some(timeout) = timeout {
|
||||
return self.wait_until_or_timeout(cond, timeout);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user