[kernel] Add locking to endpoint
Endpoints could previously crash if two senders were concurrently writing to them, so this change adds a spinlock and protects functions that touch the signals and blocked list.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
/// Definition of endpoint kobject types
|
||||
|
||||
#include <j6/signals.h>
|
||||
#include <util/spinlock.h>
|
||||
#include <util/vector.h>
|
||||
|
||||
#include "objects/kobject.h"
|
||||
@@ -72,6 +73,7 @@ private:
|
||||
|
||||
j6_status_t do_message_copy(const thread_data &sender, thread_data &receiver);
|
||||
|
||||
util::spinlock m_lock;
|
||||
util::vector<thread_data> m_blocked;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user