---
name: "struct_iio_buffer"
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/struct_iio_buffer"
---

# struct\_iio\_buffer(9)

general buffer structure

## NAME

struct\_iio\_buffer - general buffer structure

## SYNOPSIS

```
struct iio_buffer {
  unsigned int length;
  size_t bytes_per_datum;
  struct attribute_group * scan_el_attrs;
  long * scan_mask;
  bool scan_timestamp;
  const struct iio_buffer_access_funcs * access;
  struct list_head scan_el_dev_attr_list;
  struct attribute_group buffer_group;
  struct attribute_group scan_el_group;
  wait_queue_head_t pollq;
  bool stufftoread;
  const struct attribute ** attrs;
  struct list_head demux_list;
  void * demux_bounce;
  struct list_head buffer_list;
  struct kref ref;
  unsigned int watermark;
};
```

## MEMBERS

length

\[DEVICE\] number of datums in buffer

bytes\_per\_datum

\[DEVICE\] size of individual datum including timestamp

scan\_el\_attrs

\[DRIVER\] control of scan elements if that scan mode control method is used

scan\_mask

\[INTERN\] bitmask used in masking scan mode elements

scan\_timestamp

\[INTERN\] does the scan mode include a timestamp

access

\[DRIVER\] buffer access functions associated with the implementation.

scan\_el\_dev\_attr\_list

\[INTERN\] list of scan element related attributes.

buffer\_group

\[INTERN\] attributes of the buffer group

scan\_el\_group

\[DRIVER\] attribute group for those attributes not created from the iio\_chan\_info array.

pollq

\[INTERN\] wait queue to allow for polling on the buffer.

stufftoread

\[INTERN\] flag to indicate new data.

attrs

\[INTERN\] standard attributes of the buffer

demux\_list

\[INTERN\] list of operations required to demux the scan.

demux\_bounce

\[INTERN\] buffer for doing gather from incoming scan.

buffer\_list

\[INTERN\] entry in the devices list of current buffers.

ref

\[INTERN\] reference count of the buffer.

watermark

\[INTERN\] number of datums to wait for poll/read.

## AUTHOR

**Daniel Baluta** \<daniel.baluta@intel.com\>

Author.

## COPYRIGHT
