当前位置:网站首页>【OBS】circlebuf
【OBS】circlebuf
2022-07-27 04:04:00 【Better go against the wind than wait for the wind to come】
Circular buffer ¶
A circular buffer , When data is pushed forward or backward , It will automatically increase the size as needed .
#include <util/circlebuf.h>
Circular buffer structure (struct circlebuf)
structure circlebuf
Invalid * circlebuf.data
Size _t circlebuf.size
Size _t circlebuf.start_pos
Size _t circlebuf.end_pos
Size _t circlebuf.capacity
Loop buffer inline function
Invalid circlebuf_init( struct circlebuf *cb )
Initialize a circular buffer ( Just clear the whole structure ).
Parameters
cb - Circular buffer
Invalid circlebuf_free( struct circlebuf *cb )
Release the circular buffer .
Parameters
cb - Circular buffer
void circlebuf_reserve( struct circlebuf *cb , size_t Capacity )
Reserve a certain amount of buffer space to ensure that upsizing is minimized .
Parameters
cb - Circular buffer
Capacity – New capacity , In bytes
void circlebuf_upsize( struct circlebuf *cb , size_t size )
Set current activity ( Not just keep ) size . Any new data is zero .
Parameters
cb - Circular buffer
size – New size , With
边栏推荐
- Plato farm brings a new experience to community users through the LAAS protocol elephant swap
- Day 28 of leetcode
- H.265网页播放器EasyPlayer对外开放录像的方法
- Article main content extraction software [based on NLP technology]
- About the solution of using hyperbeach to appear /bin/sh: 1: packr2: not found
- Do you really understand code rollback?
- Skywalking distributed system application performance monitoring tool - medium
- Framework学习之旅:init 进程启动过程
- Realization of regular hexagon map with two-dimensional array of unity
- Process analysis of object creation
猜你喜欢

Process analysis of object creation

想要获得 Apache 官方域名邮箱吗?专访 Apache Linkis 五位新晋 Committer告诉你怎么做

On the first day of Shenzhen furniture exhibition, the three highlights of Jin Ke'er booth were unlocked!

Principle understanding and application of hash table and consistent hash

STM32CubeMX学习笔记(41)——ETH接口+LwIP协议栈使用(DHCP)

科目三: 济南章丘三号线

C. Cypher

Startup process and rescue mode

First pass of routing strategy

Maximum subarray cumulative sum less than or equal to K
随机推荐
Using redis C library, the problem of asynchronous memory leakage
Detailed tutorial of typera
C. Cypher
Application of one-dimensional array
Implementation of API short message gateway based on golang
一维数组的应用
Leetcode- > 2-point search and clock in (3)
0726~简历梳理面试总结
Skywalking distributed system application performance monitoring tool - medium
科目三: 济南章丘五号线
Prime factorization -- C (GCC) -- PTA
C#怎么实现给Word每一页设置不同文字水印
Plato farm has a new way of playing, and the arbitrage eplato has secured super high returns
03. Get the web page source code
阿里云服务器域名加端口网页不能访问问题记录
次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
Chapter 4 决策树和随机森林
Day 27 of leetcode
Characteristics and determination scheme of Worthington pectinase
科目三: 济南章丘6号线