kernel: Improve accuracy of KResourceLimit emulation (#7221)

* core: Refactor resource limits

* svc: Implement SetResourceLimitLimitValues

* Also correct existing name and add missing error codes
This commit is contained in:
GPUCode 2023-12-04 13:31:06 +02:00 committed by GitHub
parent 875f5eaad5
commit 59df319f48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 421 additions and 301 deletions

View file

@ -12,6 +12,7 @@
#include <boost/serialization/string.hpp>
#include "common/common_types.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/resource_limit.h"
#include "core/hle/kernel/wait_object.h"
#include "core/hle/result.h"
@ -36,6 +37,7 @@ public:
return HANDLE_TYPE;
}
std::shared_ptr<ResourceLimit> resource_limit;
int lock_count; ///< Number of times the mutex has been acquired
u32 priority; ///< The priority of the mutex, used for priority inheritance.
std::string name; ///< Name of mutex (optional)
@ -71,6 +73,7 @@ private:
ar& priority;
ar& name;
ar& holding_thread;
ar& resource_limit;
}
};