mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-16 08:04:23 -04:00
kern: implement KHandleTable, other cleanup
This commit is contained in:
parent
d5a4c17ee7
commit
484f132651
41 changed files with 710 additions and 89 deletions
|
@ -19,6 +19,8 @@ namespace ams::kern {
|
|||
|
||||
|
||||
Result KAutoObjectWithListContainer::Register(KAutoObjectWithList *obj) {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
KScopedLightLock lk(this->lock);
|
||||
|
||||
this->object_list.insert(*obj);
|
||||
|
@ -27,6 +29,8 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
Result KAutoObjectWithListContainer::Unregister(KAutoObjectWithList *obj) {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
KScopedLightLock lk(this->lock);
|
||||
|
||||
this->object_list.erase(this->object_list.iterator_to(*obj));
|
||||
|
@ -35,6 +39,8 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
size_t KAutoObjectWithListContainer::GetOwnedCount(KProcess *owner) {
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
KScopedLightLock lk(this->lock);
|
||||
|
||||
size_t count = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue