mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-27 09:12:32 +00:00
a635873568
Replace the I/O response handler that is passed to the VFS at construction with an object that is dynamically attached to handles. This object shall also accept read-ready notifications, and plugins are encouraged to keep handles awaiting ready-ready notifications separate from handles that await I/O progress. Replace the use of handle lists in plugins with handle queues, this makes the code easier to understand and the ordering of notifications to the application more explicit. These changes replace the use of the Post_signal_hook from all VFS plugins, applications must assume that read-ready and I/O notifications occur during I/O signal dispatch and use an Io_progress_handler at its entrypoints to defer response until after signal dispatching. Fix #3257
40 lines
766 B
C++
40 lines
766 B
C++
/*
|
|
* \brief Cross-plugin VFS environment
|
|
* \author Emery Hemingway
|
|
* \date 2018-04-02
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2018-2019 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _INCLUDE__VFS__ENV_H_
|
|
#define _INCLUDE__VFS__ENV_H_
|
|
|
|
#include <vfs/file_system.h>
|
|
#include <base/allocator.h>
|
|
#include <base/env.h>
|
|
|
|
namespace Vfs { struct Env; }
|
|
|
|
struct Vfs::Env : Interface
|
|
{
|
|
virtual Genode::Env &env() = 0;
|
|
|
|
/**
|
|
* Allocator for creating stuctures shared
|
|
* across open VFS handles.
|
|
*/
|
|
virtual Genode::Allocator &alloc() = 0;
|
|
|
|
/**
|
|
* VFS root file-system
|
|
*/
|
|
virtual File_system &root_dir() = 0;
|
|
};
|
|
|
|
#endif /* _INCLUDE__VFS__ENV_H_ */
|