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:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2019-05-16 11:54:43 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2019-05-16 11:54:43 +0300
commit80a4ec68793e072adaf7619bef8b97542926d452 (patch)
treec1f73db9b18e4e6f3caac544c77d0f69d8d5e5f6
parent719dcf500640f9b21eb4520744ff8e60d4b6d947 (diff)
Replace persistent<T> with new ensure_stores() from P1631.
-rw-r--r--CMakeLists.txt2
-rw-r--r--include/llfio/revision.hpp6
-rw-r--r--include/llfio/v2.0/config.hpp6
-rw-r--r--include/llfio/v2.0/map_handle.hpp28
m---------include/llfio/v2.0/outcome0
m---------include/llfio/v2.0/quickcpplib0
m---------test/kerneltest0
7 files changed, 24 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15caae4e..d7d6f688 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ find_quickcpplib_library(quickcpplib 1.0 REQUIRED)
find_quickcpplib_library(outcome 2.0 REQUIRED)
find_quickcpplib_library(kerneltest 1.0 REQUIRED)
if(WIN32)
- add_subdirectory("include/llfio/ntkernel-error-category" )
+ add_subdirectory("include/llfio/ntkernel-error-category" EXCLUDE_FROM_ALL)
endif()
# Make the standard static and shared libraries, and if supported by this compiler, C++ modules
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp
index 5ce38f5e..ec163612 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 d1f4429d43448daf0b79a6b414aff7c4ad12356b
-#define LLFIO_PREVIOUS_COMMIT_DATE "2019-05-08 09:48:00 +00:00"
-#define LLFIO_PREVIOUS_COMMIT_UNIQUE d1f4429d
+#define LLFIO_PREVIOUS_COMMIT_REF 719dcf500640f9b21eb4520744ff8e60d4b6d947
+#define LLFIO_PREVIOUS_COMMIT_DATE "2019-05-08 09:57:41 +00:00"
+#define LLFIO_PREVIOUS_COMMIT_UNIQUE 719dcf50
diff --git a/include/llfio/v2.0/config.hpp b/include/llfio/v2.0/config.hpp
index e08db987..d7459197 100644
--- a/include/llfio/v2.0/config.hpp
+++ b/include/llfio/v2.0/config.hpp
@@ -334,10 +334,10 @@ LLFIO_V2_NAMESPACE_END
LLFIO_V2_NAMESPACE_BEGIN
using namespace QUICKCPPLIB_NAMESPACE::string_view;
LLFIO_V2_NAMESPACE_END
-// Bring in a persistent implementation
-#include "quickcpplib/include/persistent.hpp"
+// Bring in an ensure_stores implementation
+#include "quickcpplib/include/ensure_stores.hpp"
LLFIO_V2_NAMESPACE_BEGIN
-using namespace QUICKCPPLIB_NAMESPACE::persistence;
+using namespace QUICKCPPLIB_NAMESPACE::ensure_stores;
LLFIO_V2_NAMESPACE_END
diff --git a/include/llfio/v2.0/map_handle.hpp b/include/llfio/v2.0/map_handle.hpp
index cf6a7b84..0b6f9c94 100644
--- a/include/llfio/v2.0/map_handle.hpp
+++ b/include/llfio/v2.0/map_handle.hpp
@@ -97,7 +97,11 @@ public:
{
}
//! Implicit move construction of section_handle permitted
- constexpr section_handle(section_handle &&o) noexcept : handle(std::move(o)), _backing(o._backing), _anonymous(std::move(o._anonymous)), _flag(o._flag)
+ constexpr section_handle(section_handle &&o) noexcept
+ : handle(std::move(o))
+ , _backing(o._backing)
+ , _anonymous(std::move(o._anonymous))
+ , _flag(o._flag)
{
o._backing = nullptr;
o._flag = flag::none;
@@ -386,7 +390,15 @@ public:
constexpr map_handle() {} // NOLINT
LLFIO_HEADERS_ONLY_VIRTUAL_SPEC ~map_handle() override;
//! Implicit move construction of map_handle permitted
- constexpr map_handle(map_handle &&o) noexcept : io_handle(std::move(o)), _section(o._section), _addr(o._addr), _offset(o._offset), _reservation(o._reservation), _length(o._length), _pagesize(o._pagesize), _flag(o._flag)
+ constexpr map_handle(map_handle &&o) noexcept
+ : io_handle(std::move(o))
+ , _section(o._section)
+ , _addr(o._addr)
+ , _offset(o._offset)
+ , _reservation(o._reservation)
+ , _length(o._length)
+ , _pagesize(o._pagesize)
+ , _flag(o._flag)
{
o._section = nullptr;
o._addr = nullptr;
@@ -436,17 +448,11 @@ public:
LLFIO_MAKE_FREE_FUNCTION
static const_buffer_type barrier(const_buffer_type req, bool evict = false) noexcept
{
- auto *tp = (const_buffer_type::pointer)(((uintptr_t) req.data()) & 31);
+ auto *tp = (const_buffer_type::pointer)(((uintptr_t) req.data()) & 63);
const_buffer_type ret{tp, (size_t)(req.data() + req.size() - tp)};
- for(const_buffer_type::pointer addr = ret.data(); addr < ret.data() + ret.size(); addr += 32)
+ if(memory_flush_none == ensure_stores(ret.data(), ret.size(), evict ? memory_flush_evict : memory_flush_retain).first)
{
- // Slightly UB ...
- auto *p = reinterpret_cast<const persistent<byte> *>(addr);
- if(memory_flush_none == p->flush(evict ? memory_flush_evict : memory_flush_retain))
- {
- ret = {tp, 0};
- break;
- }
+ ret = {tp, 0};
}
return ret;
}
diff --git a/include/llfio/v2.0/outcome b/include/llfio/v2.0/outcome
-Subproject 7e7d94bce47d810e8d0b7ad93d7011be2f027e5
+Subproject 3a8bc94c0e94596f8af6f020f17c4330c2c6dfa
diff --git a/include/llfio/v2.0/quickcpplib b/include/llfio/v2.0/quickcpplib
-Subproject d88b0518d3f7b63c7650b07bf59d0a677d8902d
+Subproject 0278f309bd53a557f0857abab23383f4188ad9c
diff --git a/test/kerneltest b/test/kerneltest
-Subproject 0d484ee031fbfb26c4c4b9d838dc2263ab7b2ac
+Subproject fae40a978f59aed69a27881bbadc9565b35e056