Skip to content

Commit

Permalink
reactor: Move add_to_flush_poller() to internal namespace
Browse files Browse the repository at this point in the history
Not the part of public API at all

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
  • Loading branch information
xemul authored and avikivity committed Oct 5, 2023
1 parent e8ff3f3 commit b0f8013
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion include/seastar/core/iostream-impl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ output_stream<CharType>::slow_write(const char_type* buf, size_t n) noexcept {
}
}

namespace internal {
void add_to_flush_poller(output_stream<char>& x) noexcept;
}

template <typename CharType>
future<> output_stream<CharType>::do_flush() noexcept {
Expand Down Expand Up @@ -439,7 +441,7 @@ output_stream<CharType>::flush() noexcept {
} else {
_flush = true;
if (!_in_batch) {
add_to_flush_poller(*this);
internal::add_to_flush_poller(*this);
_in_batch = promise<>();
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/seastar/core/reactor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ private:
friend class smp_message_queue;
friend class internal::poller;
friend class scheduling_group;
friend void add_to_flush_poller(output_stream<char>& os) noexcept;
friend void internal::add_to_flush_poller(output_stream<char>& os) noexcept;
friend void seastar::internal::increase_thrown_exceptions_counter() noexcept;
friend void report_failed_future(const std::exception_ptr& eptr) noexcept;
friend void with_allow_abandoned_failed_futures(unsigned count, noncopyable_function<void ()> func);
Expand Down
8 changes: 4 additions & 4 deletions src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4718,10 +4718,6 @@ future<> later() noexcept {
return check_for_io_immediately();
}

void add_to_flush_poller(output_stream<char>& os) noexcept {
engine()._flush_batching.push_back(os);
}

steady_clock_type::duration reactor::total_idle_time() {
return _total_idle;
}
Expand Down Expand Up @@ -5004,6 +5000,10 @@ rename_scheduling_group(scheduling_group sg, sstring new_name, sstring new_short

namespace internal {

void add_to_flush_poller(output_stream<char>& os) noexcept {
engine()._flush_batching.push_back(os);
}

inline
sched_clock::duration
timeval_to_duration(::timeval tv) {
Expand Down

0 comments on commit b0f8013

Please sign in to comment.