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:
-rw-r--r--example/use_cases.cpp4
-rw-r--r--include/llfio/revision.hpp6
-rw-r--r--include/llfio/v2.0/async_file_handle.hpp6
-rw-r--r--include/llfio/v2.0/mapped.hpp10
-rw-r--r--release_notes.md11
-rw-r--r--test/tests/async_io.cpp2
-rw-r--r--test/tests/coroutines.cpp2
-rw-r--r--test/tests/fast_random_file_handle.cpp9
-rw-r--r--test/tests/map_handle_create_close/runner.cpp4
9 files changed, 27 insertions, 27 deletions
diff --git a/example/use_cases.cpp b/example/use_cases.cpp
index 62ab7d23..ac93b06b 100644
--- a/example/use_cases.cpp
+++ b/example/use_cases.cpp
@@ -100,7 +100,7 @@ void read_entire_file2()
llfio::async_file_handle::buffer_type scatter_req{ buffers[n].first.data(), buffers[n].first.size() }; // buffer to fill
auto ret = llfio::async_read( //
fh, // handle to read from
- { { scatter_req }, valid_extents[n].offset }, // The scatter request buffers + offset
+ { { &scatter_req, 1 }, valid_extents[n].offset }, // The scatter request buffers + offset
[]( // The completion handler
llfio::async_file_handle *, // The parent handle
llfio::async_file_handle::io_result<llfio::async_file_handle::buffers_type> && // Result of the i/o
@@ -421,4 +421,4 @@ std::future<void> coroutine_write()
int main()
{
return 0;
-} \ No newline at end of file
+}
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp
index 32b11a93..1690e45b 100644
--- a/include/llfio/revision.hpp
+++ b/include/llfio/revision.hpp
@@ -1,4 +1,4 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define LLFIO_PREVIOUS_COMMIT_REF ad329252468e010ac3432bf5cef7dc4a701dbcb3
-#define LLFIO_PREVIOUS_COMMIT_DATE "2020-03-23 19:59:45 +00:00"
-#define LLFIO_PREVIOUS_COMMIT_UNIQUE ad329252
+#define LLFIO_PREVIOUS_COMMIT_REF 38acd5685b0ad798754f2c0357043e0dd199808d
+#define LLFIO_PREVIOUS_COMMIT_DATE "2020-03-24 09:51:28 +00:00"
+#define LLFIO_PREVIOUS_COMMIT_UNIQUE 38acd568
diff --git a/include/llfio/v2.0/async_file_handle.hpp b/include/llfio/v2.0/async_file_handle.hpp
index 7ce93782..0f366ffc 100644
--- a/include/llfio/v2.0/async_file_handle.hpp
+++ b/include/llfio/v2.0/async_file_handle.hpp
@@ -382,7 +382,7 @@ public:
*/
LLFIO_MAKE_FREE_FUNCTION
template <class CompletionRoutine> //
- LLFIO_REQUIRES(detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<const_buffers_type> &&>::value) //
+ LLFIO_REQUIRES(true || detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<const_buffers_type> &&>::value) //
result<io_state_ptr> async_barrier(io_request<const_buffers_type> reqs, CompletionRoutine &&completion, barrier_kind kind = barrier_kind::nowait_data_only, span<char> mem = {}) noexcept
{
LLFIO_LOG_FUNCTION_CALL(this);
@@ -439,7 +439,7 @@ public:
*/
LLFIO_MAKE_FREE_FUNCTION
template <class CompletionRoutine> //
- LLFIO_REQUIRES(detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<buffers_type> &&>::value) //
+ LLFIO_REQUIRES(true || detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<buffers_type> &&>::value) //
result<io_state_ptr> async_read(io_request<buffers_type> reqs, CompletionRoutine &&completion, span<char> mem = {}) noexcept
{
LLFIO_LOG_FUNCTION_CALL(this);
@@ -483,7 +483,7 @@ public:
*/
LLFIO_MAKE_FREE_FUNCTION
template <class CompletionRoutine> //
- LLFIO_REQUIRES(detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<const_buffers_type> &&>::value) //
+ LLFIO_REQUIRES(true || detail::is_invocable_r<void, CompletionRoutine, async_file_handle *, io_result<const_buffers_type> &&>::value) //
result<io_state_ptr> async_write(io_request<const_buffers_type> reqs, CompletionRoutine &&completion, span<char> mem = {}) noexcept
{
LLFIO_LOG_FUNCTION_CALL(this);
diff --git a/include/llfio/v2.0/mapped.hpp b/include/llfio/v2.0/mapped.hpp
index 8eaa41fe..efebabf9 100644
--- a/include/llfio/v2.0/mapped.hpp
+++ b/include/llfio/v2.0/mapped.hpp
@@ -101,7 +101,7 @@ public:
//! The size type.
using size_type = typename section_handle::size_type;
//! The index type
- using index_type = typename span<T>::index_type;
+ //using index_type = typename span<T>::index_type;
//! The element type
using element_type = typename span<T>::element_type;
//! The value type
@@ -160,7 +160,7 @@ public:
, _sectionh(std::move(o._sectionh))
, _maph(std::move(o._maph))
{
- static_cast<span<T> &>(o) = {nullptr, 0};
+ static_cast<span<T> &>(o) = {};
}
mapped &operator=(const mapped &) = delete;
mapped &operator=(mapped &&o) noexcept
@@ -190,12 +190,12 @@ public:
using span<T>::last;
using span<T>::subspan;
using span<T>::size;
- using span<T>::ssize;
+ //using span<T>::ssize;
using span<T>::size_bytes;
using span<T>::empty;
using span<T>::operator[];
- using span<T>::operator();
- using span<T>::at;
+ //using span<T>::operator();
+ //using span<T>::at;
using span<T>::data;
using span<T>::begin;
using span<T>::end;
diff --git a/release_notes.md b/release_notes.md
index ad27c3fb..73d0ee23 100644
--- a/release_notes.md
+++ b/release_notes.md
@@ -23,10 +23,12 @@ as Intel Optane.
It is a complete rewrite after a Boost peer review in August 2015. Its github
source code repository lives at https://github.com/ned14/llfio.
+- `llfio::path_view` is expected to enter the C++ 23 standard. `llfio::file_handle` and `llfio::mapped_file_handle` are on track for entering the C++ 23 standard.
- Portable to any conforming C++ 14 compiler with a working Filesystem TS in its STL.
- - Note that VS2019 16.3 and libc++ 11 dropped support for Filesystem in C++ 14.
-- Will make use of any Concepts TS if you have them.
-- Provides view adapters into the Ranges TS, so ready for STL2.
+ - Note that VS2019 16.3 and libc++ 11 dropped support for Filesystem in C++ 14, so for those LLFIO's cmake forces on C++ 17.
+- Fully clean with C++ 20.
+ - Will make use of any Coroutines, Concepts, Span, Byte etc if you have them, otherwise swaps in C++ 14 compatible alternatives.
+ - NOTE that libstdc++ does not currently provide symbols for `<codecvt>` if you are building in C++ 20, so linking LLFIO programs on libstdc++ if in C++ 20 will fail. Either use a different STL, manually rebuild libstdc++, or use C++ 17.
- Original error code is always preserved, even down to the original NT kernel error code if a NT kernel API was used.
- Optional configuration based on [P1028](https://wg21.link/P1028) *SG14 status_code and standard error object
for P0709 Zero-overhead deterministic exceptions*.
@@ -34,9 +36,8 @@ source code repository lives at https://github.com/ned14/llfio.
- Zero malloc, zero exception throw and zero whole system memory copy design used throughout, even down to paths (which can hit 64Kb!).
- Comprehensive support for virtual and mapped memory of both SCM/DAX and page cached storage, including large, huge and super pages.
- Works very well with the C++ standard library, and is being proposed for standardisation into C++. See <a href="https://wg21.link/P1031">P1031 *Low level file i/o*</a>.
-- `async_file_handle` supports `co_await` (Coroutines TS).
-\note Note that this code is of late alpha quality. It's quite reliable on Windows and Linux, but be careful when using it!
+\note This code is of late beta quality. It has been shipping in production with multiple vendors for some years now. It is quite reliable on Windows and Linux (less well tested on Mac OS), so be careful when using it!
Examples of use:
<table width="100%" border="0" cellpadding="4">
diff --git a/test/tests/async_io.cpp b/test/tests/async_io.cpp
index 9f1ef546..da6e2dbd 100644
--- a/test/tests/async_io.cpp
+++ b/test/tests/async_io.cpp
@@ -43,7 +43,7 @@ static inline void TestAsyncFileHandle()
std::promise<llfio::async_file_handle::const_buffers_type> p;
auto f(p.get_future());
auto schedule_io = [&] {
- return h.async_write({bt, n * 4096}, [ p = std::move(p), n ](llfio::async_file_handle *, llfio::async_file_handle::io_result<llfio::async_file_handle::const_buffers_type> && result) mutable {
+ return h.async_write({{&bt, 1}, n * 4096}, [ p = std::move(p), n ](llfio::async_file_handle *, llfio::async_file_handle::io_result<llfio::async_file_handle::const_buffers_type> && result) mutable {
(void) n;
if(!result && result.error() == llfio::errc::resource_unavailable_try_again)
{
diff --git a/test/tests/coroutines.cpp b/test/tests/coroutines.cpp
index dd962116..d4cccf06 100644
--- a/test/tests/coroutines.cpp
+++ b/test/tests/coroutines.cpp
@@ -50,7 +50,7 @@ static inline void TestAsyncFileHandleCoroutines()
{
// This will initiate the i/o, and suspend the coroutine until completion.
// The caller will thus resume execution with a valid unsignaled future.
- auto written = co_await h.co_write({bt, n * 32768 + no * 4096}).value();
+ auto written = co_await h.co_write({{&bt, 1}, n * 32768 + no * 4096}).value();
written.value();
}
};
diff --git a/test/tests/fast_random_file_handle.cpp b/test/tests/fast_random_file_handle.cpp
index 60cd34b3..bddfe5c9 100644
--- a/test/tests/fast_random_file_handle.cpp
+++ b/test/tests/fast_random_file_handle.cpp
@@ -26,7 +26,6 @@ Distributed under the Boost Software License, Version 1.0.
#include "quickcpplib/algorithm/small_prng.hpp"
-
static inline void TestFastRandomFileHandleWorks()
{
static constexpr size_t testbytes = 1024 * 1024UL;
@@ -36,7 +35,7 @@ static inline void TestFastRandomFileHandleWorks()
mapped<byte> store(testbytes);
fast_random_file_handle h = fast_random_file_handle::fast_random_file(testbytes).value();
// Bulk read
- BOOST_CHECK(h.read(0, {{store.begin(), store.size()}}).value() == store.size());
+ BOOST_CHECK(h.read(0, {{store.data(), store.size()}}).value() == store.size());
// Now make sure that random read offsets and lengths match exactly
small_prng rand;
@@ -53,7 +52,7 @@ static inline void TestFastRandomFileHandleWorks()
{
BOOST_CHECK(bytesread == length);
}
- BOOST_CHECK(!memcmp(buffer, store.begin() + offset, bytesread));
+ BOOST_CHECK(!memcmp(buffer, store.data() + offset, bytesread));
}
}
@@ -63,7 +62,7 @@ static inline void TestFastRandomFileHandlePerformance()
using namespace LLFIO_V2_NAMESPACE;
using LLFIO_V2_NAMESPACE::byte;
mapped<byte> store(testbytes);
- memset(store.begin(), 1, store.size());
+ memset(store.data(), 1, store.size());
fast_random_file_handle h = fast_random_file_handle::fast_random_file(testbytes).value();
auto begin = std::chrono::high_resolution_clock::now();
while(std::chrono::duration_cast<std::chrono::seconds>(std::chrono::high_resolution_clock::now() - begin).count() < 1)
@@ -97,7 +96,7 @@ static inline void TestFastRandomFileHandlePerformance()
begin = std::chrono::high_resolution_clock::now();
for(size_t n = 0; n < 10; n++)
{
- h.read(0, {{store.begin(), store.size()}}).value();
+ h.read(0, {{store.data(), store.size()}}).value();
}
end = std::chrono::high_resolution_clock::now();
auto diff2 = std::chrono::duration_cast<std::chrono::microseconds>(end - begin);
diff --git a/test/tests/map_handle_create_close/runner.cpp b/test/tests/map_handle_create_close/runner.cpp
index 681f0819..945f94ed 100644
--- a/test/tests/map_handle_create_close/runner.cpp
+++ b/test/tests/map_handle_create_close/runner.cpp
@@ -116,14 +116,14 @@ template <class U> inline void map_handle_create_close_(U &&f)
if (use_file_backing)
{
map_handle::buffer_type req{ nullptr, 20 };
- auto b = maph.read({ req, 0 }).value();
+ auto b = maph.read({ {&req, 1}, 0 }).value();
KERNELTEST_CHECK(testreturn, b[0].data() == addr);
KERNELTEST_CHECK(testreturn, b[0].size() == 19); // reads do not read more than the backing length
}
else
{
map_handle::buffer_type req{ nullptr, 5000 };
- auto b = maph.read({ req, 5 }).value();
+ auto b = maph.read({ {&req, 1}, 5 }).value();
KERNELTEST_CHECK(testreturn, b[0].data() == addr+5); // NOLINT
KERNELTEST_CHECK(testreturn, b[0].size() == 4091);
}