Skip to content

Commit

Permalink
pw_channel: Remove deprecated Rpc2StdioChannelInit overload
Browse files Browse the repository at this point in the history
Change-Id: Id774e666f3577095fb896fa0e69cdccf6fcfaced
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/259652
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Docs-Not-Needed: Wyatt Hepler <[email protected]>
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Dave Roth <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Jan 23, 2025
1 parent aa3dd95 commit 58c2593
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
15 changes: 4 additions & 11 deletions pw_channel/public/pw_channel/rp2_stdio_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,15 @@ namespace pw::channel {
/// Initializes and returns a reference to a channel that speaks over rp2's
/// stdio.
///
/// The read and write allocators should be different to avoid deadlocks due to
/// the read or write side of the API attempting to acquire more memory while
/// the other holds it.
///
/// ***This must only be called at-most once.***
ByteReaderWriter& Rp2StdioChannelInit(
pw::multibuf::MultiBufAllocator& read_allocator,
pw::multibuf::MultiBufAllocator& write_allocator);

/// DEPRECATED: prefer the two-allocator version of this API to avoid
/// deadlocks due to the read or write side of the API attempting to acquire
/// more memory while the other holds it.
///
/// Initializes and returns a reference to a channel that speaks over rp2's
/// stdio.
///
/// ***This must only be called at-most once.***
[[deprecated]] ByteReaderWriter& Rp2StdioChannelInit(
pw::multibuf::MultiBufAllocator& allocator);

/// @}

} // namespace pw::channel
4 changes: 0 additions & 4 deletions pw_channel/rp2_stdio_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,4 @@ ByteReaderWriter& Rp2StdioChannelInit(MultiBufAllocator& read_allocator,
return channel.channel();
}

ByteReaderWriter& Rp2StdioChannelInit(MultiBufAllocator& allocator) {
return Rp2StdioChannelInit(allocator, allocator);
}

} // namespace pw::channel
2 changes: 1 addition & 1 deletion targets/rp2040/system_async_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ int main() {
stdio_usb_init();

static pw::multibuf::test::SimpleAllocatorForTest<4096, 4096> mb_alloc;
pw::SystemStart(pw::channel::Rp2StdioChannelInit(mb_alloc));
pw::SystemStart(pw::channel::Rp2StdioChannelInit(mb_alloc, mb_alloc));
PW_UNREACHABLE;
}

0 comments on commit 58c2593

Please sign in to comment.