diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-04-09 15:17:16 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-04-09 15:17:16 +0300 |
commit | d1f4429d43448daf0b79a6b414aff7c4ad12356b (patch) | |
tree | 1dc02145ce058426133fe823dbc7a04577adcb0a | |
parent | 554a740c9a23869596b012cfd4195bd19bc421db (diff) |
Fix issue #18 where __cpuid identifier was macro clashing. Also update to latest Outcome.
-rw-r--r-- | include/llfio/revision.hpp | 6 | ||||
-rw-r--r-- | include/llfio/v2.0/detail/impl/posix/storage_profile.ipp | 12 | ||||
m--------- | include/llfio/v2.0/outcome | 0 | ||||
m--------- | include/llfio/v2.0/quickcpplib | 0 | ||||
-rw-r--r-- | include/llfio/v2.0/status_code.hpp | 4 | ||||
-rw-r--r-- | include/llfio/v2.0/storage_profile.hpp | 2 | ||||
m--------- | test/kerneltest | 0 | ||||
-rw-r--r-- | test/test_kernel_decl.hpp | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index b717dd9d..8d8b30ef 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 2adf5ca3d7e14be83a8d4bd4de05615c4249bbc7 -#define LLFIO_PREVIOUS_COMMIT_DATE "2018-12-15 14:00:31 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE 2adf5ca3 +#define LLFIO_PREVIOUS_COMMIT_REF 554a740c9a23869596b012cfd4195bd19bc421db +#define LLFIO_PREVIOUS_COMMIT_DATE "2018-12-15 14:56:38 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 554a740c diff --git a/include/llfio/v2.0/detail/impl/posix/storage_profile.ipp b/include/llfio/v2.0/detail/impl/posix/storage_profile.ipp index b6f151f2..f4ea2123 100644 --- a/include/llfio/v2.0/detail/impl/posix/storage_profile.ipp +++ b/include/llfio/v2.0/detail/impl/posix/storage_profile.ipp @@ -159,23 +159,23 @@ namespace storage_profile #if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) // We can do a much better CPU name on x86/x64 sp.cpu_name.value.clear(); - auto __cpuid = [](int *cpuInfo, int func) { __asm__ __volatile__("cpuid\n\t" : "=a"(cpuInfo[0]), "=b"(cpuInfo[1]), "=c"(cpuInfo[2]), "=d"(cpuInfo[3]) : "0"(func)); }; // NOLINT + auto x86cpuid = [](int *cpuInfo, int func) { __asm__ __volatile__("cpuid\n\t" : "=a"(cpuInfo[0]), "=b"(cpuInfo[1]), "=c"(cpuInfo[2]), "=d"(cpuInfo[3]) : "0"(func)); }; // NOLINT { char buffer[62]; memset(buffer, 32, 62); int nBuff[4]; - __cpuid(nBuff, 0); + x86cpuid(nBuff, 0); memcpy(buffer + 0, nBuff + 1, 4); *reinterpret_cast<int *>(buffer + 4) = nBuff[3]; *reinterpret_cast<int *>(buffer + 8) = nBuff[2]; // Do we have a brand string? - __cpuid(nBuff, 0x80000000); + x86cpuid(nBuff, 0x80000000); if(static_cast<unsigned>(nBuff[0]) >= 0x80000004) { - __cpuid(reinterpret_cast<int *>(&buffer[14]), 0x80000002); - __cpuid(reinterpret_cast<int *>(&buffer[30]), 0x80000003); - __cpuid(reinterpret_cast<int *>(&buffer[46]), 0x80000004); + x86cpuid(reinterpret_cast<int *>(&buffer[14]), 0x80000002); + x86cpuid(reinterpret_cast<int *>(&buffer[30]), 0x80000003); + x86cpuid(reinterpret_cast<int *>(&buffer[46]), 0x80000004); } else { diff --git a/include/llfio/v2.0/outcome b/include/llfio/v2.0/outcome -Subproject e17e56d945b1e68fe00bccafe3da1c2880d9486 +Subproject 525478ed519d7c3400d60110649c315d705a07a diff --git a/include/llfio/v2.0/quickcpplib b/include/llfio/v2.0/quickcpplib -Subproject 51ba91416d557eecbe16b72e0ee6a453ac9131d +Subproject 01e18d3e6549400646f41b79de318994eac95f2 diff --git a/include/llfio/v2.0/status_code.hpp b/include/llfio/v2.0/status_code.hpp index 79edcde4..7dacbec7 100644 --- a/include/llfio/v2.0/status_code.hpp +++ b/include/llfio/v2.0/status_code.hpp @@ -237,7 +237,7 @@ namespace detail using file_io_error = SYSTEM_ERROR2_NAMESPACE::errored_status_code<SYSTEM_ERROR2_NAMESPACE::erased<detail::file_io_error_domain_value_system_code>>; -template <class T> using result = OUTCOME_V2_NAMESPACE::experimental::erased_result<T, file_io_error>; +template <class T> using result = OUTCOME_V2_NAMESPACE::experimental::status_result<T, file_io_error>; using OUTCOME_V2_NAMESPACE::success; using OUTCOME_V2_NAMESPACE::failure; using OUTCOME_V2_NAMESPACE::in_place_type; @@ -562,7 +562,7 @@ inline error_info error_from_exception(std::exception_ptr &&ep = std::current_ex } using OUTCOME_V2_NAMESPACE::in_place_type; -static_assert(OUTCOME_V2_NAMESPACE::trait::has_error_code_v<error_info>, "error_info is not detected to be an error code"); +static_assert(OUTCOME_V2_NAMESPACE::trait::is_error_code_available_v<error_info>, "error_info is not detected to be an error code"); //! Choose an errc implementation using std::errc; diff --git a/include/llfio/v2.0/storage_profile.hpp b/include/llfio/v2.0/storage_profile.hpp index 9d1a3679..902621bb 100644 --- a/include/llfio/v2.0/storage_profile.hpp +++ b/include/llfio/v2.0/storage_profile.hpp @@ -30,7 +30,7 @@ Distributed under the Boost Software License, Version 1.0. #if LLFIO_EXPERIMENTAL_STATUS_CODE #include "outcome/include/outcome/experimental/status_outcome.hpp" LLFIO_V2_NAMESPACE_EXPORT_BEGIN -template <class T> using outcome = OUTCOME_V2_NAMESPACE::experimental::erased_outcome<T, file_io_error>; +template <class T> using outcome = OUTCOME_V2_NAMESPACE::experimental::status_outcome<T, file_io_error>; LLFIO_V2_NAMESPACE_END #endif diff --git a/test/kerneltest b/test/kerneltest -Subproject a81df2c15e67a69e572101e587b9a8fbc9b7756 +Subproject 0d484ee031fbfb26c4c4b9d838dc2263ab7b2ac diff --git a/test/test_kernel_decl.hpp b/test/test_kernel_decl.hpp index 52f7c0af..95fde2b3 100644 --- a/test/test_kernel_decl.hpp +++ b/test/test_kernel_decl.hpp @@ -39,7 +39,7 @@ Distributed under the Boost Software License, Version 1.0. #include "outcome/include/outcome/experimental/status-code/include/iostream_support.hpp" // Used for initialiser list stored results as the erased form is move-only -template <class T> using il_result = OUTCOME_V2_NAMESPACE::experimental::status_result<T, typename SYSTEM_ERROR2_NAMESPACE::generic_code::domain_type>; +template <class T> using il_result = OUTCOME_V2_NAMESPACE::experimental::status_result<T, SYSTEM_ERROR2_NAMESPACE::generic_code>; #else template <class T> using il_result = LLFIO_V2_NAMESPACE::result<T>; #endif |