Pigweed
 
Loading...
Searching...
No Matches
Pw_channel_rp2_stdio

Functions

ByteReaderWriterpw::channel::Rp2StdioChannelInit (pw::multibuf::MultiBufAllocator &read_allocator, pw::multibuf::MultiBufAllocator &write_allocator)
 

Detailed Description

Function Documentation

◆ Rp2StdioChannelInit()

ByteReaderWriter & pw::channel::Rp2StdioChannelInit ( pw::multibuf::MultiBufAllocator read_allocator,
pw::multibuf::MultiBufAllocator write_allocator 
)

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.