XFile: Track asynchronous/synchronous flag (and return appropriately in nt Read/Write file)

This commit is contained in:
Dr. Chat
2015-12-30 17:34:26 -06:00
parent cbc74c92f4
commit 2a590f31fe
3 changed files with 57 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ class XFile : public XObject {
public:
static const Type kType = kTypeFile;
XFile(KernelState* kernel_state, vfs::File* file);
XFile(KernelState* kernel_state, vfs::File* file, bool synchronous);
~XFile() override;
vfs::Device* device() const { return file_->entry()->device(); }
@@ -111,6 +111,8 @@ class XFile : public XObject {
static object_ref<XFile> Restore(KernelState* kernel_state,
ByteStream* stream);
bool is_synchronous() const { return is_synchronous_; }
protected:
void NotifyIOCompletionPorts(XIOCompletion::IONotification& notification);
@@ -133,6 +135,8 @@ class XFile : public XObject {
xe::filesystem::WildcardEngine find_engine_;
size_t find_index_ = 0;
bool is_synchronous_ = false;
};
} // namespace kernel