mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:47:35 +00:00
Kernel: Add a Process::FileDescriptions::get_if_valid(index) API
Note that this is not the same as ::at(index), which has a different precondition ("allocated" vs "valid").
This commit is contained in:
parent
c1ffc17134
commit
e9feced041
2 changed files with 26 additions and 0 deletions
|
@ -643,6 +643,9 @@ public:
|
|||
const FileDescriptionAndFlags& at(size_t i) const;
|
||||
FileDescriptionAndFlags& at(size_t i);
|
||||
|
||||
FileDescriptionAndFlags const* get_if_valid(size_t i) const;
|
||||
FileDescriptionAndFlags* get_if_valid(size_t i);
|
||||
|
||||
void enumerate(Function<void(const FileDescriptionAndFlags&)>) const;
|
||||
void change_each(Function<void(FileDescriptionAndFlags&)>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue