![]() |
MOS Source Code
|
#include <io.hpp>
Public Member Functions | |
IO (IOFlags flags, io_type_t type) | |
virtual | ~IO ()=0 |
IO * | ref () |
IO * | unref () |
virtual mos::string | name () const |
virtual off_t | seek (off_t, io_seek_whence_t) final |
virtual off_t | tell () final |
virtual size_t | read (void *buf, size_t count) final |
virtual size_t | pread (void *buf, size_t count, off_t offset) final |
virtual size_t | write (const void *buf, size_t count) final |
virtual bool | VerifyMMapPermissions (VMFlags flags, bool is_private) final |
bool | map (vmap_t *vmap, off_t offset) |
bool | unmap (vmap_t *vmap, bool *unmapped) |
Static Public Member Functions | |
static bool | IsValid (const IO *io) |
Public Attributes | |
const IOFlags | io_flags = IO_NONE |
const io_type_t | io_type = IO_NULL |
Private Member Functions | |
virtual void | on_closed ()=0 |
virtual size_t | on_read (void *, size_t) |
virtual size_t | on_write (const void *, size_t) |
virtual bool | on_mmap (vmap_t *, off_t) |
virtual bool | on_munmap (vmap_t *, bool *) |
virtual off_t | on_seek (off_t, io_seek_whence_t) |
Private Attributes | |
bool | io_closed = false |
atomic_t | io_refcount = 0 |
Friends | |
mos::SyslogStreamWriter | operator<< (mos::SyslogStreamWriter stream, const IO *io) |
Definition at line 35 of file io.cpp.
Referenced by BasicFile::BasicFile(), Console::Console(), IPC_ControlIO::IPC_ControlIO(), IpcConnectionIO::IpcConnectionIO(), IsValid(), NullIO::NullIO(), operator<<, PipeIOImpl::PipeIOImpl(), ref(), and unref().
Definition at line 45 of file io.hpp.
Referenced by process_detach_fd(), process_do_execveat(), process_do_fork(), process_exit(), vfs_fstatat(), and vsnprintf_do_pointer_kernel().
|
inline |
Definition at line 56 of file io.hpp.
Referenced by elf_fill_process(), io_dup(), io_dup2(), map(), mm_clone_vmap_locked(), process_attach_ref_fd(), and vmap_split().
|
inline |
Definition at line 68 of file io.hpp.
Referenced by elf_fill_process(), process_detach_fd(), process_exit(), and unmap().
|
virtual |
Reimplemented in BasicFile, and Console.
Definition at line 45 of file io.cpp.
Referenced by operator<<, vsnprintf_do_pointer_kernel(), and x86_dump_stack_at().
|
finalvirtual |
|
finalvirtual |
Definition at line 50 of file io.cpp.
Referenced by io_read(), io_readv(), Console::on_read(), and pread().
Definition at line 69 of file io.cpp.
Referenced by elf_read_file(), and io_pread().
Definition at line 98 of file io.cpp.
Referenced by io_write().
Definition at line 142 of file io.cpp.
Referenced by map(), and vm_protect().
Definition at line 172 of file io.cpp.
Referenced by mmap_file().
Definition at line 191 of file io.cpp.
Referenced by vmap_destroy().
|
privatepure virtual |
Implemented in Console, Directory, File, IPC_ControlIO, IpcClientIO, IpcServerIO, NullIO, and PipeIOImpl.
Referenced by on_closed(), and unref().
Reimplemented in Console, Directory, File, IpcClientIO, IpcServerIO, NullIO, and PipeIOImpl.
Definition at line 222 of file io.cpp.
Referenced by on_closed(), and read().
Reimplemented in Console, File, IpcClientIO, IpcServerIO, NullIO, and PipeIOImpl.
Definition at line 228 of file io.cpp.
Referenced by on_closed(), and write().
Reimplemented in File.
Definition at line 240 of file io.cpp.
Referenced by on_closed(), and unmap().
|
privatevirtual |
Reimplemented in File.
Definition at line 245 of file io.cpp.
Referenced by on_closed(), and seek().
|
friend |
const IOFlags io_flags = IO_NONE |
Definition at line 39 of file io.hpp.
Referenced by IO(), File::on_closed(), PipeIOImpl::on_closed(), PipeIOImpl::on_read(), PipeIOImpl::on_write(), pread(), read(), seek(), VerifyMMapPermissions(), and write().
Definition at line 40 of file io.hpp.
Referenced by dentry_from_fd(), IO(), ipc_accept(), MOS_STATIC_ASSERT(), Directory::on_closed(), File::on_closed(), IPC_ControlIO::on_closed(), and vfs_fstatat().
|
private |