---
name: "relay_switch_subbuf"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/relay_switch_subbuf"
---

# relay\_switch\_subbuf(9)

switch to a new sub-buffer

## NAME

relay\_switch\_subbuf - switch to a new sub-buffer

## SYNOPSIS

**size\_t relay\_switch\_subbuf(struct rchan\_buf \*** *buf***, size\_t** *length***);**

## ARGUMENTS

*buf*

channel buffer

*length*

size of current event

## DESCRIPTION

Returns either the length passed in or 0 if full.

Performs sub-buffer-switch tasks such as invoking callbacks, updating padding counts, waking up readers, etc.

## COPYRIGHT
