diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-09-25 18:31:49 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-09-25 18:31:49 +0300 |
commit | aea9a0bda5ffc7aac4ba5e8c6582893b7aad7d90 (patch) | |
tree | d5209ec744135e580d7702636064dfe37b7cd9f0 /programs | |
parent | a3942420524c91179009e06b9d77cfb4326dcf7f (diff) |
LLFIO is now make installable and cmake find_package()-able, which should implement cmake hunter support.
Significantly slimmed down the headers being dragged in by the default LLFIO include, specifically that outcome<T> is no longer dragged in, and:
- #36 Async file i/o and storage profile have been modularised out of the default headers.
- #36 Mapped file i/o can be modularised out of the default headers.
Changed barrier kind to class enum, as per latest WG21 spec.
Diffstat (limited to 'programs')
-rw-r--r-- | programs/CMakeLists.txt | 2 | ||||
-rw-r--r-- | programs/benchmark-iostreams/main.cpp | 8 | ||||
-rw-r--r-- | programs/benchmark-locking/main.cpp | 2 | ||||
-rw-r--r-- | programs/fs-probe/main.cpp | 2 | ||||
-rw-r--r-- | programs/key-value-store/include/key_value_store.hpp | 6 | ||||
-rw-r--r-- | programs/key-value-store/main.cpp | 2 |
6 files changed, 9 insertions, 13 deletions
diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index f14b4bed..7e4f63bc 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -38,7 +38,7 @@ function(make_program program) endfunction() make_program(benchmark-iostreams llfio::hl) -make_program(benchmark-locking llfio::hl) +make_program(benchmark-locking llfio::hl kerneltest::hl) make_program(fs-probe llfio::hl) make_program(illegal-codepoints llfio::hl) make_program(key-value-store llfio::hl) diff --git a/programs/benchmark-iostreams/main.cpp b/programs/benchmark-iostreams/main.cpp index 2592c920..53606c5f 100644 --- a/programs/benchmark-iostreams/main.cpp +++ b/programs/benchmark-iostreams/main.cpp @@ -27,11 +27,7 @@ Distributed under the Boost Software License, Version 1.0. #define REGIONSIZE (100 * 1024 * 1024) #include "../../include/llfio/llfio.hpp" -#if __has_include("quickcpplib/include/algorithm/small_prng.hpp") -#include "quickcpplib/include/algorithm/small_prng.hpp" -#else -#include "../../include/llfio/v2.0/quickcpplib/include/algorithm/small_prng.hpp" -#endif +#include "quickcpplib/algorithm/small_prng.hpp" #include <chrono> #include <fstream> @@ -151,7 +147,7 @@ int main() auto th = llfio::file({}, "testfile", llfio::file_handle::mode::write, llfio::file_handle::creation::if_needed).value(); std::vector<char> buffer(REGIONSIZE, 'a'); th.write(0, {{(llfio::byte *) buffer.data(), buffer.size()}}).value(); - th.barrier({}, true, true).value(); + th.barrier({}, llfio::file_handle::barrier_kind::wait_all).value(); } { auto begin = nanoclock(); diff --git a/programs/benchmark-locking/main.cpp b/programs/benchmark-locking/main.cpp index 531ce780..8eaa204b 100644 --- a/programs/benchmark-locking/main.cpp +++ b/programs/benchmark-locking/main.cpp @@ -31,7 +31,7 @@ Distributed under the Boost Software License, Version 1.0. #define _CRT_SECURE_NO_WARNINGS 1 #include "../../include/llfio/llfio.hpp" -#include "kerneltest/include/kerneltest/v1.0/child_process.hpp" +#include "kerneltest/v1.0/child_process.hpp" #include <fstream> #include <iostream> diff --git a/programs/fs-probe/main.cpp b/programs/fs-probe/main.cpp index 2ef117ae..db1a11a1 100644 --- a/programs/fs-probe/main.cpp +++ b/programs/fs-probe/main.cpp @@ -23,8 +23,10 @@ Distributed under the Boost Software License, Version 1.0. */ #define _CRT_SECURE_NO_WARNINGS 1 +#define LLFIO_INCLUDE_STORAGE_PROFILE 1 #include "../../include/llfio/llfio.hpp" +#include "outcome/iostream_support.hpp" #include <fstream> #include <iomanip> diff --git a/programs/key-value-store/include/key_value_store.hpp b/programs/key-value-store/include/key_value_store.hpp index 2740ce06..8ec30836 100644 --- a/programs/key-value-store/include/key_value_store.hpp +++ b/programs/key-value-store/include/key_value_store.hpp @@ -26,11 +26,7 @@ Distributed under the Boost Software License, Version 1.0. #define KEY_VALUE_STORE_HPP #include "../../../include/llfio/llfio.hpp" -#if __has_include("quickcpplib/include/algorithm/open_hash_index.hpp") -#include "quickcpplib/include/algorithm/open_hash_index.hpp" -#else -#include "../../../include/llfio/v2.0/quickcpplib/include/algorithm/open_hash_index.hpp" -#endif +#include "quickcpplib/algorithm/open_hash_index.hpp" #include <vector> diff --git a/programs/key-value-store/main.cpp b/programs/key-value-store/main.cpp index c7d921a6..c6de6d08 100644 --- a/programs/key-value-store/main.cpp +++ b/programs/key-value-store/main.cpp @@ -24,6 +24,8 @@ Distributed under the Boost Software License, Version 1.0. #include "include/key_value_store.hpp" +#include <iostream> + namespace stackoverflow { namespace filesystem = LLFIO_V2_NAMESPACE::filesystem; |