pipe_alloc_ex

Function pipe_alloc_ex 

Source
pub unsafe extern "C" fn pipe_alloc_ex(
    alice: PipeSideReceiveSettings,
    bob: PipeSideReceiveSettings,
) -> PipeSideBundle
Expand description

Allocates two connected sides of one pipe.

Creating a pair of sides using this function is the only way to connect two pipe sides together. Two unrelated orphaned sides may never be connected back together.

The capacity and trigger level may be different for the two directions when the pipe is created using this function. Use pipe_alloc if you don’t need control this fine.

§Arguments

  • alice - capacity and trigger_level settings for Alice’s receiving buffer
  • bob - capacity and trigger_level settings for Bob’s receiving buffer

§Returns

Bundle with both sides of the pipe