From 565f27555d13ce2a37346d838f32e03e1972aac1 Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Tue, 20 Apr 2021 11:44:21 +0100 Subject: Remove all remaining mentions of async_file_handle (issue #78). --- include/llfio/v2.0/file_handle.hpp | 8 ++------ include/llfio/v2.0/io_handle.hpp | 4 ---- include/llfio/v2.0/lockable_io_handle.hpp | 5 ----- include/llfio/v2.0/mapped_file_handle.hpp | 3 +-- 4 files changed, 3 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/llfio/v2.0/file_handle.hpp b/include/llfio/v2.0/file_handle.hpp index c012a1c5..995a65dc 100644 --- a/include/llfio/v2.0/file_handle.hpp +++ b/include/llfio/v2.0/file_handle.hpp @@ -39,14 +39,12 @@ Distributed under the Boost Software License, Version 1.0. LLFIO_V2_NAMESPACE_EXPORT_BEGIN /*! \class file_handle -\brief A handle to a regular file or device, kept data layout compatible with -async_file_handle. +\brief A handle to a regular file or device. -
Cost of openingCost of i/oConcurrency and AtomicityOther remarks
`file_handle`LeastSyscallPOSIX guarantees (usually)Least gotcha
`async_file_handle`MoreMost (syscall + malloc/free + reactor)POSIX guarantees (usually)Makes no sense to use with -cached i/o as it's a very expensive way to call `memcpy()`
`mapped_file_handle`MostLeastNoneCannot be used +
`mapped_file_handle`MostLeastNoneCannot be used with uncached i/o
@@ -379,7 +377,6 @@ public: handle configuration (e.g. writing to regular files on POSIX or writing to a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. - The asynchronous implementation in async_file_handle may perform one calloc and one free. */ LLFIO_MAKE_FREE_FUNCTION LLFIO_HEADERS_ONLY_VIRTUAL_SPEC result zero(extent_pair extent, deadline d = deadline()) noexcept; @@ -529,7 +526,6 @@ Note function may return significantly after this deadline if the i/o takes long returned if deadline i/o is not possible with this particular handle configuration (e.g. writing to regular files on POSIX or writing to a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. -The asynchronous implementation in async_file_handle may perform one calloc and one free. */ inline result zero(file_handle &self, file_handle::extent_type offset, file_handle::extent_type bytes, deadline d = deadline()) noexcept diff --git a/include/llfio/v2.0/io_handle.hpp b/include/llfio/v2.0/io_handle.hpp index edddd2f8..bd333681 100644 --- a/include/llfio/v2.0/io_handle.hpp +++ b/include/llfio/v2.0/io_handle.hpp @@ -278,7 +278,6 @@ public: returned if deadline i/o is not possible with this particular handle configuration (e.g. reading from regular files on POSIX or reading from a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. - The asynchronous implementation in async_file_handle performs one calloc and one free. */ LLFIO_MAKE_FREE_FUNCTION io_result read(io_request reqs, deadline d = deadline()) noexcept { return (_ctx == nullptr) ? _do_read(reqs, d) : _do_multiplexer_read({}, reqs, d); } @@ -321,7 +320,6 @@ public: returned if deadline i/o is not possible with this particular handle configuration (e.g. writing to regular files on POSIX or writing to a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. - The asynchronous implementation in async_file_handle performs one calloc and one free. */ LLFIO_MAKE_FREE_FUNCTION io_result write(io_request reqs, deadline d = deadline()) noexcept { return (_ctx == nullptr) ? _do_write(reqs, d) : _do_multiplexer_write({}, std::move(reqs), d); } @@ -569,7 +567,6 @@ Note function may return significantly after this deadline if the i/o takes long returned if deadline i/o is not possible with this particular handle configuration (e.g. reading from regular files on POSIX or reading from a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. -The asynchronous implementation in async_file_handle performs one calloc and one free. */ inline io_handle::io_result read(io_handle &self, io_handle::io_request reqs, deadline d = deadline()) noexcept { @@ -595,7 +592,6 @@ Note function may return significantly after this deadline if the i/o takes long returned if deadline i/o is not possible with this particular handle configuration (e.g. writing to regular files on POSIX or writing to a non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. -The asynchronous implementation in async_file_handle performs one calloc and one free. */ inline io_handle::io_result write(io_handle &self, io_handle::io_request reqs, deadline d = deadline()) noexcept { diff --git a/include/llfio/v2.0/lockable_io_handle.hpp b/include/llfio/v2.0/lockable_io_handle.hpp index 9248a48e..ae46c671 100644 --- a/include/llfio/v2.0/lockable_io_handle.hpp +++ b/include/llfio/v2.0/lockable_io_handle.hpp @@ -105,7 +105,6 @@ public: for a RAII locker. \errors Any of the values POSIX `flock()` can return. \mallocs The default synchronous implementation in `file_handle` performs no memory allocation. - The asynchronous implementation in `async_file_handle` performs one calloc and one free. */ LLFIO_HEADERS_ONLY_VIRTUAL_SPEC result lock_file() noexcept; /*! \brief Tries to lock the inode referred to by the open handle for exclusive access, @@ -115,7 +114,6 @@ public: for a RAII locker. \errors Any of the values POSIX `flock()` can return. \mallocs The default synchronous implementation in `file_handle` performs no memory allocation. - The asynchronous implementation in `async_file_handle` performs one calloc and one free. */ LLFIO_HEADERS_ONLY_VIRTUAL_SPEC bool try_lock_file() noexcept; /*! \brief Unlocks a previously acquired exclusive lock. @@ -128,7 +126,6 @@ public: for a RAII locker. \errors Any of the values POSIX `flock()` can return. \mallocs The default synchronous implementation in `file_handle` performs no memory allocation. - The asynchronous implementation in `async_file_handle` performs one calloc and one free. */ LLFIO_HEADERS_ONLY_VIRTUAL_SPEC result lock_file_shared() noexcept; /*! \brief Tries to lock the inode referred to by the open handle for shared access, @@ -138,7 +135,6 @@ public: for a RAII locker. \errors Any of the values POSIX `flock()` can return. \mallocs The default synchronous implementation in `file_handle` performs no memory allocation. - The asynchronous implementation in `async_file_handle` performs one calloc and one free. */ LLFIO_HEADERS_ONLY_VIRTUAL_SPEC bool try_lock_file_shared() noexcept; /*! \brief Unlocks a previously acquired shared lock. @@ -268,7 +264,6 @@ public: returned if deadline i/o is not possible with this particular handle configuration (e.g. non-overlapped HANDLE on Windows). \mallocs The default synchronous implementation in file_handle performs no memory allocation. - The asynchronous implementation in async_file_handle performs one calloc and one free. */ LLFIO_HEADERS_ONLY_VIRTUAL_SPEC result lock_file_range(extent_type offset, extent_type bytes, lock_kind kind, deadline d = deadline()) noexcept; //! \overload EXTENSION: Locks for shared access diff --git a/include/llfio/v2.0/mapped_file_handle.hpp b/include/llfio/v2.0/mapped_file_handle.hpp index 14c228c9..17b7a40f 100644 --- a/include/llfio/v2.0/mapped_file_handle.hpp +++ b/include/llfio/v2.0/mapped_file_handle.hpp @@ -37,8 +37,7 @@ LLFIO_V2_NAMESPACE_EXPORT_BEGIN -
Cost of openingCost of i/oConcurrency and AtomicityOther remarks
`file_handle`LeastSyscallPOSIX guarantees (usually)Least gotcha
`async_file_handle`MoreMost (syscall + malloc/free + reactor)POSIX guarantees (usually)Makes no sense to use with -cached i/o as it's a very expensive way to call `memcpy()`
`mapped_file_handle`MostLeastNoneCannot be used +
`mapped_file_handle`MostLeastNoneCannot be used with uncached i/o
-- cgit v1.2.3