Add a method for blocking threads on ports.
Additionally add the first lock class since we are becoming more concurrent.
This commit is contained in:
parent
b6735d3175
commit
6986f534f8
13 changed files with 88 additions and 14 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "lib/linked_list.h"
|
||||
#include "lib/mutex.h"
|
||||
#include "object/kernel_object.h"
|
||||
#include "object/thread.h"
|
||||
#include "usr/zcall_internal.h"
|
||||
|
||||
class Port : public KernelObject {
|
||||
|
|
@ -19,4 +21,8 @@ class Port : public KernelObject {
|
|||
};
|
||||
|
||||
LinkedList<Message> pending_messages_;
|
||||
|
||||
LinkedList<RefPtr<Thread>> blocked_threads_;
|
||||
|
||||
Mutex mutex_{"Port"};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue