kernel: split SetAddressKey into user and kernel variants
This commit is contained in:
parent
31945a6e8b
commit
b85a155abd
5 changed files with 30 additions and 12 deletions
|
@ -605,13 +605,30 @@ public:
|
|||
return address_key_value;
|
||||
}
|
||||
|
||||
void SetAddressKey(VAddr key) {
|
||||
address_key = key;
|
||||
[[nodiscard]] bool GetAddressKeyIsKernel() const {
|
||||
return address_key_is_kernel;
|
||||
}
|
||||
|
||||
void SetAddressKey(VAddr key, u32 val) {
|
||||
//! NB: intentional deviation from official kernel.
|
||||
//
|
||||
// Separate SetAddressKey into user and kernel versions
|
||||
// to cope with arbitrary host pointers making their way
|
||||
// into things.
|
||||
|
||||
void SetUserAddressKey(VAddr key) {
|
||||
address_key = key;
|
||||
address_key_is_kernel = false;
|
||||
}
|
||||
|
||||
void SetUserAddressKey(VAddr key, u32 val) {
|
||||
address_key = key;
|
||||
address_key_value = val;
|
||||
address_key_is_kernel = false;
|
||||
}
|
||||
|
||||
void SetKernelAddressKey(VAddr key) {
|
||||
address_key = key;
|
||||
address_key_is_kernel = true;
|
||||
}
|
||||
|
||||
void ClearWaitQueue() {
|
||||
|
@ -770,6 +787,7 @@ private:
|
|||
bool debug_attached{};
|
||||
s8 priority_inheritance_count{};
|
||||
bool resource_limit_release_hint{};
|
||||
bool address_key_is_kernel{};
|
||||
StackParameters stack_parameters{};
|
||||
Common::SpinLock context_guard{};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue