Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/llfio/v2.0')
-rw-r--r--include/llfio/v2.0/algorithm/shared_fs_mutex/atomic_append.hpp2
-rw-r--r--include/llfio/v2.0/algorithm/shared_fs_mutex/memory_map.hpp2
-rw-r--r--include/llfio/v2.0/config.hpp58
-rw-r--r--include/llfio/v2.0/detail/impl/posix/async_file_handle.ipp2
-rw-r--r--include/llfio/v2.0/detail/impl/windows/mapped_file_handle.ipp4
-rw-r--r--include/llfio/v2.0/directory_handle.hpp11
-rw-r--r--include/llfio/v2.0/handle.hpp14
-rw-r--r--include/llfio/v2.0/io_service.hpp2
-rw-r--r--include/llfio/v2.0/llfio.hpp6
-rw-r--r--include/llfio/v2.0/logging.hpp36
-rw-r--r--include/llfio/v2.0/map_handle.hpp6
-rw-r--r--include/llfio/v2.0/path_view.hpp12
-rw-r--r--include/llfio/v2.0/status_code.hpp20
13 files changed, 89 insertions, 86 deletions
diff --git a/include/llfio/v2.0/algorithm/shared_fs_mutex/atomic_append.hpp b/include/llfio/v2.0/algorithm/shared_fs_mutex/atomic_append.hpp
index bcdc50b9..b285cef5 100644
--- a/include/llfio/v2.0/algorithm/shared_fs_mutex/atomic_append.hpp
+++ b/include/llfio/v2.0/algorithm/shared_fs_mutex/atomic_append.hpp
@@ -105,7 +105,7 @@ namespace algorithm
- If your OS doesn't have sane byte range locks (OS X, BSD, older Linuxes) and multiple
objects in your process use the same lock file, misoperation will occur. Use lock_files instead.
- \todo Implement hole punching once I port that code from AFIO v1.
+ \todo Implement hole punching once I port that code from LLFIO v1.
\todo Decide on some resolution mechanism for sudden process exit.
\todo There is a 1 out of 2^64-2 chance of unique id collision. It would be nice if we
actually formally checked that our chosen unique id is actually unique.
diff --git a/include/llfio/v2.0/algorithm/shared_fs_mutex/memory_map.hpp b/include/llfio/v2.0/algorithm/shared_fs_mutex/memory_map.hpp
index 060fca70..724e0773 100644
--- a/include/llfio/v2.0/algorithm/shared_fs_mutex/memory_map.hpp
+++ b/include/llfio/v2.0/algorithm/shared_fs_mutex/memory_map.hpp
@@ -63,7 +63,7 @@ namespace algorithm
\tparam HashIndexSize The size in bytes of the hash index to use (defaults to 4Kb)
\tparam SpinlockType The type of spinlock to use (defaults to a `SharedMutex` concept spinlock)
- This is the highest performing filing system mutex in AFIO, but it comes with a long list of potential
+ This is the highest performing filing system mutex in LLFIO, but it comes with a long list of potential
gotchas. It works by creating a random temporary file somewhere on the system and placing its path
in a file at the lock file location. The random temporary file is mapped into memory by all processes
using the lock where an open addressed hash table is kept. Each entity is hashed into somewhere in the
diff --git a/include/llfio/v2.0/config.hpp b/include/llfio/v2.0/config.hpp
index 32fc18cf..f105f3b6 100644
--- a/include/llfio/v2.0/config.hpp
+++ b/include/llfio/v2.0/config.hpp
@@ -1,4 +1,4 @@
-/* Configures AFIO
+/* Configures LLFIO
(C) 2015-2018 Niall Douglas <http://www.nedproductions.biz/> (24 commits)
File Created: Dec 2015
@@ -30,12 +30,12 @@ Distributed under the Boost Software License, Version 1.0.
//#define LLFIO_LOGGING_LEVEL 6
//#define LLFIO_DISABLE_PATHS_IN_FAILURE_INFO
-//! \file config.hpp Configures a compiler environment for AFIO header and source code
+//! \file config.hpp Configures a compiler environment for LLFIO header and source code
//! \defgroup config Configuration macros
#if !defined(LLFIO_HEADERS_ONLY) && !defined(BOOST_ALL_DYN_LINK)
-//! \brief Whether AFIO is a headers only library. Defaults to 1 unless BOOST_ALL_DYN_LINK is defined. \ingroup config
+//! \brief Whether LLFIO is a headers only library. Defaults to 1 unless BOOST_ALL_DYN_LINK is defined. \ingroup config
#define LLFIO_HEADERS_ONLY 1
#endif
@@ -88,15 +88,15 @@ Distributed under the Boost Software License, Version 1.0.
#if defined(_WIN32)
#if !defined(_UNICODE)
-#error AFIO cannot target the ANSI Windows API. Please define _UNICODE to target the Unicode Windows API.
+#error LLFIO cannot target the ANSI Windows API. Please define _UNICODE to target the Unicode Windows API.
#endif
#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT 0x0600
#elif _WIN32_WINNT < 0x0600
-#error _WIN32_WINNT must at least be set to Windows Vista for AFIO to work
+#error _WIN32_WINNT must at least be set to Windows Vista for LLFIO to work
#endif
#if defined(NTDDI_VERSION) && NTDDI_VERSION < 0x06000000
-#error NTDDI_VERSION must at least be set to Windows Vista for AFIO to work
+#error NTDDI_VERSION must at least be set to Windows Vista for LLFIO to work
#endif
#endif
@@ -112,34 +112,34 @@ Distributed under the Boost Software License, Version 1.0.
#include "quickcpplib/include/cpp_feature.h"
#ifndef __cpp_exceptions
-#error AFIO needs C++ exceptions to be turned on
+#error LLFIO needs C++ exceptions to be turned on
#endif
#ifndef __cpp_alias_templates
-#error AFIO needs template alias support in the compiler
+#error LLFIO needs template alias support in the compiler
#endif
#ifndef __cpp_variadic_templates
-#error AFIO needs variadic template support in the compiler
+#error LLFIO needs variadic template support in the compiler
#endif
#if __cpp_constexpr < 201304L && !defined(_MSC_VER)
-#error AFIO needs relaxed constexpr (C++ 14) support in the compiler
+#error LLFIO needs relaxed constexpr (C++ 14) support in the compiler
#endif
#ifndef __cpp_init_captures
-#error AFIO needs lambda init captures support in the compiler (C++ 14)
+#error LLFIO needs lambda init captures support in the compiler (C++ 14)
#endif
#ifndef __cpp_attributes
-#error AFIO needs attributes support in the compiler
+#error LLFIO needs attributes support in the compiler
#endif
#ifndef __cpp_variable_templates
-#error AFIO needs variable template support in the compiler
+#error LLFIO needs variable template support in the compiler
#endif
#ifndef __cpp_generic_lambdas
-#error AFIO needs generic lambda support in the compiler
+#error LLFIO needs generic lambda support in the compiler
#endif
#ifdef __has_include
// clang-format off
#if !__has_include(<filesystem>) && !__has_include(<experimental/filesystem>)
// clang-format on
-#error AFIO needs an implementation of the Filesystem TS in the standard library
+#error LLFIO needs an implementation of the Filesystem TS in the standard library
#endif
#endif
@@ -154,11 +154,11 @@ Distributed under the Boost Software License, Version 1.0.
#endif
/*! \def LLFIO_V2
\ingroup config
-\brief The namespace configuration of this AFIO v2. Consists of a sequence
+\brief The namespace configuration of this LLFIO v2. Consists of a sequence
of bracketed tokens later fused by the preprocessor into namespace and C++ module names.
*/
#if DOXYGEN_IS_IN_THE_HOUSE
-//! The AFIO namespace
+//! The LLFIO namespace
namespace llfio_v2_xxx
{
//! Collection of file system based algorithms
@@ -169,30 +169,30 @@ namespace llfio_v2_xxx
namespace storage_profile
{
}
- //! Utility routines often useful when using AFIO
+ //! Utility routines often useful when using LLFIO
namespace utils
{
}
}
-/*! \brief The namespace of this AFIO v2 which will be some unknown inline
+/*! \brief The namespace of this LLFIO v2 which will be some unknown inline
namespace starting with `v2_` inside the `boost::llfio` namespace.
\ingroup config
*/
#define LLFIO_V2_NAMESPACE llfio_v2_xxx
-/*! \brief Expands into the appropriate namespace markup to enter the AFIO v2 namespace.
+/*! \brief Expands into the appropriate namespace markup to enter the LLFIO v2 namespace.
\ingroup config
*/
-#define LLFIO_V2_NAMESPACE_BEGIN \
- namespace llfio_v2_xxx \
+#define LLFIO_V2_NAMESPACE_BEGIN \
+ namespace llfio_v2_xxx \
{
/*! \brief Expands into the appropriate namespace markup to enter the C++ module
-exported AFIO v2 namespace.
+exported LLFIO v2 namespace.
\ingroup config
*/
-#define LLFIO_V2_NAMESPACE_EXPORT_BEGIN \
- export namespace llfio_v2_xxx \
+#define LLFIO_V2_NAMESPACE_EXPORT_BEGIN \
+ export namespace llfio_v2_xxx \
{
-/*! \brief Expands into the appropriate namespace markup to exit the AFIO v2 namespace.
+/*! \brief Expands into the appropriate namespace markup to exit the LLFIO v2 namespace.
\ingroup config
*/
#define LLFIO_V2_NAMESPACE_END }
@@ -471,17 +471,17 @@ LLFIO_V2_NAMESPACE_END
//#define BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
#if LLFIO_HEADERS_ONLY == 1 && !defined(LLFIO_SOURCE)
/*! \brief Expands into the appropriate markup to declare an `extern`
-function exported from the AFIO DLL if not building headers only.
+function exported from the LLFIO DLL if not building headers only.
\ingroup config
*/
#define LLFIO_HEADERS_ONLY_FUNC_SPEC inline
/*! \brief Expands into the appropriate markup to declare a class member
-function exported from the AFIO DLL if not building headers only.
+function exported from the LLFIO DLL if not building headers only.
\ingroup config
*/
#define LLFIO_HEADERS_ONLY_MEMFUNC_SPEC inline
/*! \brief Expands into the appropriate markup to declare a virtual class member
-function exported from the AFIO DLL if not building headers only.
+function exported from the LLFIO DLL if not building headers only.
\ingroup config
*/
#define LLFIO_HEADERS_ONLY_VIRTUAL_SPEC inline virtual
diff --git a/include/llfio/v2.0/detail/impl/posix/async_file_handle.ipp b/include/llfio/v2.0/detail/impl/posix/async_file_handle.ipp
index 2225b899..b24dff98 100644
--- a/include/llfio/v2.0/detail/impl/posix/async_file_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/posix/async_file_handle.ipp
@@ -191,7 +191,7 @@ template <class BuffersType, class IORoutine> result<async_file_handle::io_state
// feed more than AIO_LISTIO_MAX items to aio_suspend
// it does NOT return EINVAL as specified, but rather
// simply marks all items past AIO_LISTIO_MAX as failed
- // with EAGAIN. That punishes performance for AFIO
+ // with EAGAIN. That punishes performance for LLFIO
// because we loop setting up and tearing down
// the handlers, so if we would overload llfio_suspend,
// better to error out now rather that later in io_service.
diff --git a/include/llfio/v2.0/detail/impl/windows/mapped_file_handle.ipp b/include/llfio/v2.0/detail/impl/windows/mapped_file_handle.ipp
index f721a9ff..20493a45 100644
--- a/include/llfio/v2.0/detail/impl/windows/mapped_file_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/windows/mapped_file_handle.ipp
@@ -108,9 +108,9 @@ result<mapped_file_handle::extent_type> mapped_file_handle::truncate(extent_type
OUTCOME_TRYV(reserve(_reservation));
return ret;
}
- // Ask the section what size it is. If multiple AFIO processes are using the same file,
+ // Ask the section what size it is. If multiple LLFIO processes are using the same file,
// because the section is a singleton based on the canonical path of the file, another
- // AFIO in another process may have already resized the section for us in which case
+ // LLFIO in another process may have already resized the section for us in which case
// we can skip doing work now.
OUTCOME_TRY(size, _sh.length());
if(size != newsize)
diff --git a/include/llfio/v2.0/directory_handle.hpp b/include/llfio/v2.0/directory_handle.hpp
index 5d5aba9f..8c5aa09d 100644
--- a/include/llfio/v2.0/directory_handle.hpp
+++ b/include/llfio/v2.0/directory_handle.hpp
@@ -123,7 +123,7 @@ public:
enum class filter
{
none, //!< Do no filtering at all
- fastdeleted //!< Filter out AFIO deleted files based on their filename (fast and fairly reliable)
+ fastdeleted //!< Filter out LLFIO deleted files based on their filename (fast and fairly reliable)
};
public:
@@ -322,7 +322,8 @@ inline void swap(directory_handle &self, directory_handle &o) noexcept
\errors Any of the values POSIX open() or CreateFile() can return.
*/
-inline result<directory_handle> directory(const path_handle &base, directory_handle::path_view_type path, directory_handle::mode _mode = directory_handle::mode::read, directory_handle::creation _creation = directory_handle::creation::open_existing, directory_handle::caching _caching = directory_handle::caching::all, directory_handle::flag flags = directory_handle::flag::none) noexcept
+inline result<directory_handle> directory(const path_handle &base, directory_handle::path_view_type path, directory_handle::mode _mode = directory_handle::mode::read, directory_handle::creation _creation = directory_handle::creation::open_existing, directory_handle::caching _caching = directory_handle::caching::all,
+ directory_handle::flag flags = directory_handle::flag::none) noexcept
{
return directory_handle::directory(std::forward<decltype(base)>(base), std::forward<decltype(path)>(path), std::forward<decltype(_mode)>(_mode), std::forward<decltype(_creation)>(_creation), std::forward<decltype(_caching)>(_caching), std::forward<decltype(flags)>(flags));
}
@@ -344,7 +345,8 @@ parameter is ignored.
\errors Any of the values POSIX open() or CreateFile() can return.
*/
-inline result<directory_handle> temp_directory(directory_handle::path_view_type name = directory_handle::path_view_type(), directory_handle::mode _mode = directory_handle::mode::write, directory_handle::creation _creation = directory_handle::creation::if_needed, directory_handle::caching _caching = directory_handle::caching::all, directory_handle::flag flags = directory_handle::flag::none) noexcept
+inline result<directory_handle> temp_directory(directory_handle::path_view_type name = directory_handle::path_view_type(), directory_handle::mode _mode = directory_handle::mode::write, directory_handle::creation _creation = directory_handle::creation::if_needed,
+ directory_handle::caching _caching = directory_handle::caching::all, directory_handle::flag flags = directory_handle::flag::none) noexcept
{
return directory_handle::temp_directory(std::forward<decltype(name)>(name), std::forward<decltype(_mode)>(_mode), std::forward<decltype(_creation)>(_creation), std::forward<decltype(_caching)>(_caching), std::forward<decltype(flags)>(flags));
}
@@ -363,7 +365,8 @@ is no longer using any items within (leafnames are views onto the original kerne
\mallocs If the `kernelbuffer` parameter is set on entry, no memory allocations.
If unset, at least one memory allocation, possibly more is performed.
*/
-inline result<directory_handle::enumerate_info> enumerate(const directory_handle &self, directory_handle::buffers_type &&tofill, directory_handle::path_view_type glob = directory_handle::path_view_type(), directory_handle::filter filtering = directory_handle::filter::fastdeleted, span<char> kernelbuffer = span<char>()) noexcept
+inline result<directory_handle::enumerate_info> enumerate(const directory_handle &self, directory_handle::buffers_type &&tofill, directory_handle::path_view_type glob = directory_handle::path_view_type(), directory_handle::filter filtering = directory_handle::filter::fastdeleted,
+ span<char> kernelbuffer = span<char>()) noexcept
{
return self.enumerate(std::forward<decltype(tofill)>(tofill), std::forward<decltype(glob)>(glob), std::forward<decltype(filtering)>(filtering), std::forward<decltype(kernelbuffer)>(kernelbuffer));
}
diff --git a/include/llfio/v2.0/handle.hpp b/include/llfio/v2.0/handle.hpp
index eb6066b5..6df647cb 100644
--- a/include/llfio/v2.0/handle.hpp
+++ b/include/llfio/v2.0/handle.hpp
@@ -103,14 +103,14 @@ public:
editions of Windows, the file entry does not disappears but becomes unavailable for
anyone else to open with an `errc::resource_unavailable_try_again` error return. Because this is confusing, unless the
`win_disable_unlink_emulation` flag is also specified, this POSIX behaviour is
- somewhat emulated by AFIO on older Windows by renaming the file to a random name on `close()`
+ somewhat emulated by LLFIO on older Windows by renaming the file to a random name on `close()`
causing it to appear to have been unlinked immediately.
*/
unlink_on_first_close = 1U << 0U,
/*! Some kernel caching modes have unhelpfully inconsistent behaviours
in getting your data onto storage, so by default unless this flag is
- specified AFIO adds extra fsyncs to the following operations for the
+ specified LLFIO adds extra fsyncs to the following operations for the
caching modes specified below:
* truncation of file length either explicitly or during file open.
* closing of the handle either explicitly or in the destructor.
@@ -156,7 +156,7 @@ public:
created files on NTFS, unlike in almost every other major filing system. You have to
explicitly "opt in" to extents-based storage.
- As extents-based storage is nearly cost free on NTFS, AFIO by default opts in to
+ As extents-based storage is nearly cost free on NTFS, LLFIO by default opts in to
extents-based storage for any empty file it creates. If you don't want this, you
can specify this flag to prevent that happening.
*/
@@ -217,18 +217,18 @@ public:
circumstances e.g. renaming may switch to a different hard link's path which is almost
certainly a bug.
- If AFIO was not able to determine the current path for this open handle e.g. the inode
+ If LLFIO was not able to determine the current path for this open handle e.g. the inode
has been unlinked, it returns an empty path. Be aware that FreeBSD can return an empty
- (deleted) path for file inodes no longer cached by the kernel path cache, AFIO cannot
+ (deleted) path for file inodes no longer cached by the kernel path cache, LLFIO cannot
detect the difference. FreeBSD will also return any path leading to the inode if it is
hard linked. FreeBSD does implement path retrieval for directory inodes
correctly however, and see `algorithm::stablized_path<T>` for a handle adapter which
makes use of that.
- On Linux if `/proc` is not mounted, this call fails with an error. All APIs in AFIO
+ On Linux if `/proc` is not mounted, this call fails with an error. All APIs in LLFIO
which require the use of `current_path()` can be told to not use it e.g. `flag::disable_safety_unlinks`.
It is up to you to detect if `current_path()` is not working, and to change how you
- call AFIO appropriately.
+ call LLFIO appropriately.
\warning This call is expensive, it always asks the kernel for the current path, and no
checking is done to ensure what the kernel returns is accurate or even sensible.
diff --git a/include/llfio/v2.0/io_service.hpp b/include/llfio/v2.0/io_service.hpp
index b4c294d1..e83ea59a 100644
--- a/include/llfio/v2.0/io_service.hpp
+++ b/include/llfio/v2.0/io_service.hpp
@@ -122,7 +122,7 @@ initating i/o and completing it onto a single kernel thread.
Unlike the `io_service` in ASIO or the Networking TS, this `io_service`
is much simpler, in particular it is single threaded per instance only
i.e. you must run a separate `io_service` instance one per kernel thread
-if you wish to run i/o processing across multiple threads. AFIO does not
+if you wish to run i/o processing across multiple threads. LLFIO does not
do this for you (and for good reason, unlike socket i/o, it is generally
unwise to distribute file i/o across kernel threads due to the much
more code executable between user space and physical storage i.e. keeping
diff --git a/include/llfio/v2.0/llfio.hpp b/include/llfio/v2.0/llfio.hpp
index c55a09ed..b5399af6 100644
--- a/include/llfio/v2.0/llfio.hpp
+++ b/include/llfio/v2.0/llfio.hpp
@@ -1,4 +1,4 @@
-//! \file v2.0/llfio.hpp The master *versioned* AFIO include file. All version specific AFIO consuming libraries should include this header only.
+//! \file v2.0/llfio.hpp The master *versioned* LLFIO include file. All version specific LLFIO consuming libraries should include this header only.
#undef LLFIO_VERSION_MAJOR
#undef LLFIO_VERSION_MINOR
@@ -24,10 +24,10 @@
#if defined(__cpp_modules) || defined(DOXYGEN_SHOULD_SKIP_THIS)
#if defined(_MSC_VER) && !defined(__clang__)
-//! \brief The AFIO C++ module name
+//! \brief The LLFIO C++ module name
#define LLFIO_MODULE_NAME LLFIO_VERSION_GLUE(llfio_v, LLFIO_NAMESPACE_VERSION, )
#else
-//! \brief The AFIO C++ module name
+//! \brief The LLFIO C++ module name
#define LLFIO_MODULE_NAME LLFIO_VERSION_GLUE(llfio_v, LLFIO_NAMESPACE_VERSION, )
#endif
#endif
diff --git a/include/llfio/v2.0/logging.hpp b/include/llfio/v2.0/logging.hpp
index 16fce9f3..0cce2ccc 100644
--- a/include/llfio/v2.0/logging.hpp
+++ b/include/llfio/v2.0/logging.hpp
@@ -1,4 +1,4 @@
-/* Configures AFIO
+/* LLFIO logging
(C) 2015-2018 Niall Douglas <http://www.nedproductions.biz/> (24 commits)
File Created: Dec 2015
@@ -33,7 +33,7 @@ Distributed under the Boost Software License, Version 1.0.
*/
LLFIO_V2_NAMESPACE_BEGIN
-//! The log used by AFIO
+//! The log used by LLFIO
inline LLFIO_DECL QUICKCPPLIB_NAMESPACE::ringbuffer_log::simple_ringbuffer_log<LLFIO_LOGGING_MEMORY> &log() noexcept
{
static QUICKCPPLIB_NAMESPACE::ringbuffer_log::simple_ringbuffer_log<LLFIO_LOGGING_MEMORY> _log(static_cast<QUICKCPPLIB_NAMESPACE::ringbuffer_log::level>(LLFIO_LOGGING_LEVEL));
@@ -156,35 +156,35 @@ LLFIO_V2_NAMESPACE_END
#ifndef LLFIO_LOG_FATAL_TO_CERR
#include <cstdio>
-#define LLFIO_LOG_FATAL_TO_CERR(expr) \
+#define LLFIO_LOG_FATAL_TO_CERR(expr) \
fprintf(stderr, "%s\n", (expr)); \
fflush(stderr)
#endif
#endif // LLFIO_LOGGING_LEVEL
#if LLFIO_LOGGING_LEVEL >= 1
-#define LLFIO_LOG_FATAL(inst, message) \
+#define LLFIO_LOG_FATAL(inst, message) \
{ \
- ::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::fatal, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 1U)) ? nullptr : __func__, __LINE__); \
- LLFIO_LOG_FATAL_TO_CERR(message); \
+ ::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::fatal, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 1U)) ? nullptr : __func__, __LINE__); \
+ LLFIO_LOG_FATAL_TO_CERR(message); \
}
#else
#define LLFIO_LOG_FATAL(inst, message) LLFIO_LOG_FATAL_TO_CERR(message)
#endif
#if LLFIO_LOGGING_LEVEL >= 2
-#define LLFIO_LOG_ERROR(inst, message) \
+#define LLFIO_LOG_ERROR(inst, message) \
::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::error, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 2U)) ? nullptr : __func__, __LINE__)
#else
#define LLFIO_LOG_ERROR(inst, message)
#endif
#if LLFIO_LOGGING_LEVEL >= 3
-#define LLFIO_LOG_WARN(inst, message) \
+#define LLFIO_LOG_WARN(inst, message) \
::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::warn, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 3U)) ? nullptr : __func__, __LINE__)
#else
#define LLFIO_LOG_WARN(inst, message)
#endif
#if LLFIO_LOGGING_LEVEL >= 4
-#define LLFIO_LOG_INFO(inst, message) \
+#define LLFIO_LOG_INFO(inst, message) \
::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::info, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 4U)) ? nullptr : __func__, __LINE__)
// Need to expand out our namespace into a string
@@ -200,7 +200,7 @@ LLFIO_V2_NAMESPACE_END
LLFIO_V2_NAMESPACE_BEGIN
namespace detail
{
- // Returns the AFIO namespace as a string
+ // Returns the LLFIO namespace as a string
inline span<char> llfio_namespace_string()
{
static char buffer[64];
@@ -255,21 +255,21 @@ namespace detail
}
LLFIO_V2_NAMESPACE_END
#ifdef _MSC_VER
-#define LLFIO_LOG_FUNCTION_CALL(inst) \
+#define LLFIO_LOG_FUNCTION_CALL(inst) \
if(log().log_level() >= log_level::info) \
{ \
char buffer[256]; \
- ::LLFIO_V2_NAMESPACE::detail::strip_pretty_function(buffer, sizeof(buffer), __FUNCSIG__); \
- ::LLFIO_V2_NAMESPACE::detail::log_inst_to_info(inst, buffer); \
+ ::LLFIO_V2_NAMESPACE::detail::strip_pretty_function(buffer, sizeof(buffer), __FUNCSIG__); \
+ ::LLFIO_V2_NAMESPACE::detail::log_inst_to_info(inst, buffer); \
} \
LLFIO_LOG_INST_TO_TLS(inst)
#else
-#define LLFIO_LOG_FUNCTION_CALL(inst) \
+#define LLFIO_LOG_FUNCTION_CALL(inst) \
if(log().log_level() >= log_level::info) \
{ \
char buffer[256]; \
- ::LLFIO_V2_NAMESPACE::detail::strip_pretty_function(buffer, sizeof(buffer), __PRETTY_FUNCTION__); \
- ::LLFIO_V2_NAMESPACE::detail::log_inst_to_info(inst, buffer); \
+ ::LLFIO_V2_NAMESPACE::detail::strip_pretty_function(buffer, sizeof(buffer), __PRETTY_FUNCTION__); \
+ ::LLFIO_V2_NAMESPACE::detail::log_inst_to_info(inst, buffer); \
} \
LLFIO_LOG_INST_TO_TLS(inst)
#endif
@@ -278,13 +278,13 @@ LLFIO_V2_NAMESPACE_END
#define LLFIO_LOG_FUNCTION_CALL(inst) LLFIO_LOG_INST_TO_TLS(inst)
#endif
#if LLFIO_LOGGING_LEVEL >= 5
-#define LLFIO_LOG_DEBUG(inst, message) \
+#define LLFIO_LOG_DEBUG(inst, message) \
::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::debug, ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 5U)) ? nullptr : __func__, __LINE__)
#else
#define LLFIO_LOG_DEBUG(inst, message)
#endif
#if LLFIO_LOGGING_LEVEL >= 6
-#define LLFIO_LOG_ALL(inst, message) \
+#define LLFIO_LOG_ALL(inst, message) \
::LLFIO_V2_NAMESPACE::log().emplace_back(QUICKCPPLIB_NAMESPACE::ringbuffer_log::level::all, (message), ::LLFIO_V2_NAMESPACE::detail::unsigned_integer_cast<unsigned>(inst), QUICKCPPLIB_NAMESPACE::utils::thread::this_thread_id(), (LLFIO_LOG_BACKTRACE_LEVELS & (1U << 6U)) ? nullptr : __func__, __LINE__)
#else
#define LLFIO_LOG_ALL(inst, message)
diff --git a/include/llfio/v2.0/map_handle.hpp b/include/llfio/v2.0/map_handle.hpp
index 1878d9d5..d3a8c2df 100644
--- a/include/llfio/v2.0/map_handle.hpp
+++ b/include/llfio/v2.0/map_handle.hpp
@@ -271,7 +271,7 @@ This is vast overkill if you are using non-volatile RAM, so a special *inlined*
taking a single buffer and no other arguments is also provided. This calls the appropriate architecture-specific
instructions to cause the CPU to write all preceding writes out of the write buffers and CPU caches to main
memory, so for Intel CPUs this would be `CLWB <each cache line>; SFENCE;`. As this is inlined, it ought to
-produce optimal code. If your CPU does not support the requisite instructions (or AFIO has not added support),
+produce optimal code. If your CPU does not support the requisite instructions (or LLFIO has not added support),
and empty buffer will be returned to indicate that nothing was barriered, same as the normal `barrier()`
function.
@@ -356,7 +356,7 @@ public:
\param evict Whether to also evict the cache lines from CPU caches, useful if they will not be used again.
Upon return, one knows that memory in the returned buffer has been barriered
- (it may be empty if there is no support for this operation in AFIO, or if the current CPU does not
+ (it may be empty if there is no support for this operation in LLFIO, or if the current CPU does not
support this operation). You may find the `is_nvram()` observer of particular use here.
*/
LLFIO_MAKE_FREE_FUNCTION
@@ -628,7 +628,7 @@ in the request to main memory.
\param evict Whether to also evict the cache lines from CPU caches, useful if they will not be used again.
Upon return, one knows that memory in the returned buffer has been barriered
-(it may be empty if there is no support for this operation in AFIO, or if the current CPU does not
+(it may be empty if there is no support for this operation in LLFIO, or if the current CPU does not
support this operation). You may find the `is_nvram()` observer of particular use here.
*/
inline map_handle::const_buffer_type barrier(map_handle &self, map_handle::const_buffer_type req, bool evict = false) noexcept
diff --git a/include/llfio/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp
index 46272dc2..23ec86a5 100644
--- a/include/llfio/v2.0/path_view.hpp
+++ b/include/llfio/v2.0/path_view.hpp
@@ -55,9 +55,9 @@ namespace detail
\brief A borrowed view of a path. A lightweight trivial-type alternative to
`std::filesystem::path`.
-AFIO is sufficiently fast that `std::filesystem::path` as a wrapper of an
+LLFIO is sufficiently fast that `std::filesystem::path` as a wrapper of an
underlying `std::basic_string<>` can be problematically expensive for some
-filing system operations due to the potential memory allocation. AFIO
+filing system operations due to the potential memory allocation. LLFIO
therefore works exclusively with borrowed views of other path storage.
Some of the API for `std::filesystem::path` is replicated here, however any
@@ -70,7 +70,7 @@ possible with borrowed views.
Be aware that on Microsoft Windows, the native path storage
`std::filesystem::path::value_type` is a `wchar_t` referring to UTF-16.
-However much of AFIO path usage is a `path_handle` to somewhere on the filing
+However much of LLFIO path usage is a `path_handle` to somewhere on the filing
system plus a relative `const char *` UTF-8 path fragment as the use of
absolute paths is discouraged. Rather than complicate the ABI to handle
templated path character types, on Microsoft Windows only we do the following:
@@ -85,12 +85,12 @@ buffer. We use the fast NT kernel UTF8 to UTF16 routine, not the slow Win32
routine.
3. Any forward slashes are converted to backwards slashes.
-AFIO calls the NT kernel API directly rather than the Win32 API for:
+LLFIO calls the NT kernel API directly rather than the Win32 API for:
- For any paths relative to a `path_handle` (the Win32 API does not provide a
race free file system API).
- For any paths beginning with `\!!\`, we pass the path + 3 characters
-directly through. This prefix is a pure AFIO extension, and will not be
+directly through. This prefix is a pure LLFIO extension, and will not be
recognised by other code.
- For any paths beginning with `\??\`, we pass the path + 0 characters
directly through. Note the NT kernel keeps a symlink at `\??\` which refers to
@@ -300,7 +300,7 @@ public:
return false;
});
}
- // True if the path view matches the format of an AFIO deleted file
+ // True if the path view matches the format of an LLFIO deleted file
constexpr bool is_llfio_deleted() const noexcept
{
return filename()._invoke([](const auto &v) {
diff --git a/include/llfio/v2.0/status_code.hpp b/include/llfio/v2.0/status_code.hpp
index 1d07070a..eb4803cb 100644
--- a/include/llfio/v2.0/status_code.hpp
+++ b/include/llfio/v2.0/status_code.hpp
@@ -1,4 +1,4 @@
-/* Configures AFIO
+/* LLFIO error handling
(C) 2018 Niall Douglas <http://www.nedproductions.biz/> (24 commits)
File Created: June 2018
@@ -35,20 +35,20 @@ tag.
Status code, on the other hand, is templated and is designed for custom
domains which can set arbitrary payloads. So we define custom domains and
-status codes for AFIO with these combinations:
+status codes for LLFIO with these combinations:
- win32_error{ DWORD }
- ntkernel_error{ LONG }
- posix_error{ int }
- generic_error{ errc }
-Each of these is a separate AFIO custom status code domain. We also define
+Each of these is a separate LLFIO custom status code domain. We also define
an erased form of these custom domains, and that is typedefed to
error_domain<intptr_t>::value_type.
-This design ensure that AFIO can be configured into either std-based error
+This design ensure that LLFIO can be configured into either std-based error
handling or SG14 experimental status code handling. It defaults to the latter
-as that (a) enables safe header only AFIO on Windows (b) produces better codegen
+as that (a) enables safe header only LLFIO on Windows (b) produces better codegen
(c) drags in far fewer STL headers.
*/
@@ -73,7 +73,7 @@ namespace detail
uint32_t _thread_id{0};
// The TLS path store entry
uint16_t _tls_path_id1{static_cast<uint16_t>(-1)}, _tls_path_id2{static_cast<uint16_t>(-1)};
- // The id of the relevant log entry in the AFIO log (if logging enabled)
+ // The id of the relevant log entry in the LLFIO log (if logging enabled)
size_t _log_id{static_cast<size_t>(-1)};
//! Default construction
@@ -149,7 +149,7 @@ SYSTEM_ERROR2_NAMESPACE_END
LLFIO_V2_NAMESPACE_BEGIN
/*! \class error_domain
-\brief The SG14 status code domain for errors in AFIO.
+\brief The SG14 status code domain for errors in LLFIO.
*/
template <class BaseStatusCodeDomain> class error_domain : public BaseStatusCodeDomain
{
@@ -160,7 +160,7 @@ public:
using string_ref = typename BaseStatusCodeDomain::string_ref;
using atomic_refcounted_string_ref = typename BaseStatusCodeDomain::atomic_refcounted_string_ref;
- //! \brief The value type of errors in AFIO
+ //! \brief The value type of errors in LLFIO
using value_type = detail::error_domain_value_type<typename _base::value_type>;
error_domain() = default;
@@ -352,7 +352,7 @@ struct error_info;
inline std::error_code make_error_code(error_info ei);
/*! \struct error_info
-\brief The cause of the failure of an operation in AFIO.
+\brief The cause of the failure of an operation in LLFIO.
*/
struct error_info
{
@@ -369,7 +369,7 @@ private:
uint32_t _thread_id{0};
// The TLS path store entry
uint16_t _tls_path_id1{static_cast<uint16_t>(-1)}, _tls_path_id2{static_cast<uint16_t>(-1)};
- // The id of the relevant log entry in the AFIO log (if logging enabled)
+ // The id of the relevant log entry in the LLFIO log (if logging enabled)
size_t _log_id{static_cast<size_t>(-1)};
public: