Skip to content

Commit

Permalink
allow change default transfer max size of uring file
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jan 22, 2024
1 parent b7ec8af commit 6c6c3d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/ylt/thirdparty/asio/completion_condition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ namespace asio {
namespace detail {

// The default maximum number of bytes to transfer in a single operation.
enum default_max_transfer_size_t { default_max_transfer_size = 65536 };
enum default_max_transfer_size_t
{
#if defined(ASIO_HAS_FILE) \
&& defined(ASIO_HAS_IO_URING) \
&& defined(ASIO_SPEC_MAX_TRANSFER_SIZE)
default_max_transfer_size = ASIO_SPEC_MAX_TRANSFER_SIZE
#else
default_max_transfer_size = 65536
#endif
};

// Adapt result of old-style completion conditions (which had a bool result
// where true indicated that the operation was complete).
Expand Down

0 comments on commit 6c6c3d2

Please sign in to comment.