mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
Kernel: Port more code to KResult and KResultOr<T>.
This commit is contained in:
parent
3079ef01ce
commit
028afabf6b
15 changed files with 155 additions and 198 deletions
|
@ -236,7 +236,7 @@ public:
|
|||
void* sys$get_shared_buffer(int shared_buffer_id);
|
||||
int sys$release_shared_buffer(int shared_buffer_id);
|
||||
|
||||
bool wait_for_connect(Socket&, int& error);
|
||||
KResult wait_for_connect(Socket&);
|
||||
|
||||
static void initialize();
|
||||
|
||||
|
@ -349,7 +349,7 @@ private:
|
|||
struct FileDescriptorAndFlags {
|
||||
operator bool() const { return !!descriptor; }
|
||||
void clear() { descriptor = nullptr; flags = 0; }
|
||||
void set(RetainPtr<FileDescriptor>&& d, dword f = 0) { descriptor = move(d); flags = f; }
|
||||
void set(Retained<FileDescriptor>&& d, dword f = 0) { descriptor = move(d); flags = f; }
|
||||
RetainPtr<FileDescriptor> descriptor;
|
||||
dword flags { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue