11/* A handle to something
2- (C) 2015-2021 Niall Douglas <http://www.nedproductions.biz/> (11 commits)
2+ (C) 2015-2026 Niall Douglas <http://www.nedproductions.biz/> (11 commits)
33File Created: Dec 2015
44
55
@@ -25,9 +25,6 @@ Distributed under the Boost Software License, Version 1.0.
2525#include " ../../../byte_io_handle.hpp"
2626#include " import.hpp"
2727
28- #include < WinSock2.h>
29- #include < ws2ipdef.h>
30-
3128LLFIO_V2_NAMESPACE_BEGIN
3229
3330size_t byte_io_handle::_do_max_buffers () const noexcept
@@ -46,7 +43,8 @@ size_t byte_io_handle::_do_max_buffers() const noexcept
4643}
4744
4845template <class BuffersType >
49- inline bool do_cancel (const native_handle_type &nativeh, span<windows_nt_kernel::IO_STATUS_BLOCK> ols, byte_io_handle::io_request<BuffersType> reqs) noexcept
46+ inline bool do_cancel (const native_handle_type &nativeh, span<windows_nt_kernel::IO_STATUS_BLOCK> ols,
47+ byte_io_handle::io_request<BuffersType> reqs) noexcept
5048{
5149 using namespace windows_nt_kernel ;
5250 using EIOSB = windows_nt_kernel::IO_STATUS_BLOCK;
@@ -75,8 +73,9 @@ inline bool do_cancel(const native_handle_type &nativeh, span<windows_nt_kernel:
7573
7674// Returns true if operation completed immediately
7775template <bool blocking, class Syscall , class BuffersType >
78- inline bool do_read_write (byte_io_handle::io_result<BuffersType> &ret, Syscall &&syscall, const native_handle_type &nativeh,
79- span<windows_nt_kernel::IO_STATUS_BLOCK> ols, byte_io_handle::io_request<BuffersType> reqs, deadline d) noexcept
76+ inline bool do_read_write (byte_io_handle::io_result<BuffersType> &ret, Syscall &&syscall,
77+ const native_handle_type &nativeh, span<windows_nt_kernel::IO_STATUS_BLOCK> ols,
78+ byte_io_handle::io_request<BuffersType> reqs, deadline d) noexcept
8079{
8180 using namespace windows_nt_kernel ;
8281 using EIOSB = windows_nt_kernel::IO_STATUS_BLOCK;
@@ -130,7 +129,8 @@ inline bool do_read_write(byte_io_handle::io_result<BuffersType> &ret, Syscall &
130129#endif
131130 reqs.offset += req.size ();
132131 ol.Status = 0x103 /* STATUS_PENDING*/ ;
133- NTSTATUS ntstat = syscall (nativeh.h , nullptr , nullptr , nullptr , &ol, (PVOID) req.data (), static_cast <DWORD>(req.size ()), &offset, nullptr );
132+ NTSTATUS ntstat = syscall (nativeh.h , nullptr , nullptr , nullptr , &ol, (PVOID) req.data (),
133+ static_cast <DWORD>(req.size ()), &offset, nullptr );
134134 if (ntstat < 0 && ntstat != 0x103 /* STATUS_PENDING*/ )
135135 {
136136 InterlockedCompareExchange (&ol.Status , ntstat, 0x103 /* STATUS_PENDING*/ );
@@ -191,8 +191,8 @@ inline bool do_read_write(byte_io_handle::io_result<BuffersType> &ret, Syscall &
191191 return true ;
192192}
193193
194- byte_io_handle::io_result<byte_io_handle::buffers_type> byte_io_handle::_do_read (byte_io_handle::io_request<byte_io_handle::buffers_type> reqs,
195- deadline d) noexcept
194+ byte_io_handle::io_result<byte_io_handle::buffers_type>
195+ byte_io_handle::_do_read (byte_io_handle::io_request<byte_io_handle::buffers_type> reqs, deadline d) noexcept
196196{
197197 windows_nt_kernel::init ();
198198 using namespace windows_nt_kernel ;
@@ -216,8 +216,8 @@ byte_io_handle::io_result<byte_io_handle::buffers_type> byte_io_handle::_do_read
216216 return ret;
217217}
218218
219- byte_io_handle::io_result<byte_io_handle::const_buffers_type> byte_io_handle::_do_write (byte_io_handle::io_request<byte_io_handle::const_buffers_type> reqs,
220- deadline d) noexcept
219+ byte_io_handle::io_result<byte_io_handle::const_buffers_type>
220+ byte_io_handle::_do_write (byte_io_handle::io_request<byte_io_handle::const_buffers_type> reqs, deadline d) noexcept
221221{
222222 windows_nt_kernel::init ();
223223 using namespace windows_nt_kernel ;
@@ -241,8 +241,9 @@ byte_io_handle::io_result<byte_io_handle::const_buffers_type> byte_io_handle::_d
241241 return ret;
242242}
243243
244- byte_io_handle::io_result<byte_io_handle::const_buffers_type> byte_io_handle::_do_barrier (byte_io_handle::io_request<byte_io_handle::const_buffers_type> reqs,
245- barrier_kind kind, deadline d) noexcept
244+ byte_io_handle::io_result<byte_io_handle::const_buffers_type>
245+ byte_io_handle::_do_barrier (byte_io_handle::io_request<byte_io_handle::const_buffers_type> reqs, barrier_kind kind,
246+ deadline d) noexcept
246247{
247248 windows_nt_kernel::init ();
248249 using namespace windows_nt_kernel ;
0 commit comments