diff --git a/mesosphere/include/mesosphere/kresources/KObjectAllocator.hpp b/mesosphere/include/mesosphere/kresources/KObjectAllocator.hpp index a26faef7b..3dcc75008 100644 --- a/mesosphere/include/mesosphere/kresources/KObjectAllocator.hpp +++ b/mesosphere/include/mesosphere/kresources/KObjectAllocator.hpp @@ -1,7 +1,6 @@ #pragma once #include #include -#include #include #include @@ -38,7 +37,6 @@ class KObjectAllocator { T, boost::intrusive::base_hook, boost::intrusive::compare - //boost::intrusive::key_of_value >::type; using pointer = T *; @@ -71,8 +69,9 @@ class KObjectAllocator { allocatedSet.erase(obj); } - T *FindObject(u64 comparisonKey) + SharedPtr FindObject(u64 comparisonKey) noexcept { + std::scoped_lock guard{mutex}; auto it = allocatedSet.find(comparisonKey, ComparatorEqual{}); return it != allocatedSet.end() ? &*it : nullptr; } diff --git a/mesosphere/include/mesosphere/processes/KEvent.hpp b/mesosphere/include/mesosphere/processes/KEvent.hpp index 16891c1b5..3559710a9 100644 --- a/mesosphere/include/mesosphere/processes/KEvent.hpp +++ b/mesosphere/include/mesosphere/processes/KEvent.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/mesosphere/include/mesosphere/processes/KWritableEvent.hpp b/mesosphere/include/mesosphere/processes/KWritableEvent.hpp index a2e0ad2f4..e57d79c77 100644 --- a/mesosphere/include/mesosphere/processes/KWritableEvent.hpp +++ b/mesosphere/include/mesosphere/processes/KWritableEvent.hpp @@ -2,6 +2,7 @@ #include #include +#include #include #include