mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
[orbis-kernel] Implement sys_mname
This commit is contained in:
parent
71444c236a
commit
a1a91bb557
4 changed files with 58 additions and 6 deletions
|
|
@ -22,6 +22,22 @@ struct NamedObjInfo {
|
|||
uint16_t ty;
|
||||
};
|
||||
|
||||
struct NamedMemoryRange {
|
||||
uint64_t begin, end;
|
||||
|
||||
constexpr bool operator<(const NamedMemoryRange &rhs) const {
|
||||
return end <= rhs.begin;
|
||||
}
|
||||
|
||||
friend constexpr bool operator<(const NamedMemoryRange &lhs, uint64_t ptr) {
|
||||
return lhs.end <= ptr;
|
||||
}
|
||||
|
||||
friend constexpr bool operator<(uint64_t ptr, const NamedMemoryRange &rhs) {
|
||||
return ptr < rhs.begin;
|
||||
}
|
||||
};
|
||||
|
||||
struct Process final {
|
||||
KernelContext *context = nullptr;
|
||||
pid_t pid = -1;
|
||||
|
|
@ -49,5 +65,9 @@ struct Process final {
|
|||
utils::shared_mutex namedObjMutex;
|
||||
utils::kmap<void *, utils::kstring> namedObjNames;
|
||||
utils::OwningIdMap<NamedObjInfo, uint, 65535, 1> namedObjIds;
|
||||
|
||||
// Named memory ranges for debugging
|
||||
utils::shared_mutex namedMemMutex;
|
||||
utils::kmap<NamedMemoryRange, utils::kstring> namedMem;
|
||||
};
|
||||
} // namespace orbis
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue