[zion] Move channel to use the message queue.
This commit is contained in:
parent
fe1641ac38
commit
d60b2bdc61
5 changed files with 27 additions and 89 deletions
|
|
@ -20,7 +20,9 @@ z_err_t Port::Read(uint64_t* num_bytes, void* bytes, uint64_t* num_caps,
|
|||
z_cap_t* caps) {
|
||||
mutex_.Lock();
|
||||
while (message_queue_.empty()) {
|
||||
blocked_threads_.PushBack(gScheduler->CurrentThread());
|
||||
auto thread = gScheduler->CurrentThread();
|
||||
thread->SetState(Thread::BLOCKED);
|
||||
blocked_threads_.PushBack(thread);
|
||||
mutex_.Unlock();
|
||||
gScheduler->Yield();
|
||||
mutex_.Lock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue