当前位置:网站首页>【OBS】circlebuf
【OBS】circlebuf
2022-07-27 02:41:00 【等风来不如迎风去】
循环缓冲区¶
一个循环缓冲区,当数据被推到前面或后面时,它会根据需要自动增加大小。
#include <util/circlebuf.h>
循环缓冲区结构 (struct circlebuf)
结构circlebuf
无效 * circlebuf.data
尺寸_t circlebuf.size
尺寸_t circlebuf.start_pos
尺寸_t circlebuf.end_pos
尺寸_t circlebuf.capacity
循环缓冲区内联函数
无效circlebuf_init( struct circlebuf *cb )
初始化一个循环缓冲区(只是将整个结构清零)。
参数
cb - 循环缓冲区
无效circlebuf_free( struct circlebuf *cb )
释放循环缓冲区。
参数
cb - 循环缓冲区
void circlebuf_reserve( struct circlebuf *cb , size_t 容量)
保留特定数量的缓冲区空间以确保最小化升迁。
参数
cb - 循环缓冲区
容量– 新容量,以字节为单位
void circlebuf_upsize( struct circlebuf *cb , size_t 大小)
设置当前活动(不仅仅是保留)大小。任何新数据都归零。
参数
cb - 循环缓冲区
size – 新的大小,以
边栏推荐
- 深圳家具展首日,金可儿展位三大看点全解锁!
- 手动从0搭建ABP框架-ABP官方完整解决方案和手动搭建简化解决方案实践
- Learning and understanding of four special data types of redis
- Have you encountered the situation that CDC reads incomplete MySQL fields? How to deal with it?
- STM32CubeMX学习笔记(41)——ETH接口+LwIP协议栈使用(DHCP)
- B. ICPC Balloons
- Machine learning [Matplotlib]
- Binary tree (Beijing University of Posts and Telecommunications machine test questions) (day85)
- Characteristics and experimental suggestions of abbkine abfluor 488 cell apoptosis detection kit
- OC message mechanism
猜你喜欢

NFT数字藏品系统开发:小蚁数智帮助品牌一键上链发行NFT

About the solution of using hyperbeach to appear /bin/sh: 1: packr2: not found

Application, addition and deletion of B-tree

Plato Farm有望通过Elephant Swap,进一步向外拓展生态

深圳家具展首日,金可儿展位三大看点全解锁!

手动从0搭建ABP框架-ABP官方完整解决方案和手动搭建简化解决方案实践

The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode

The fifth strong network cup national network security challenge Title reappearance (with title attachment, detailed explanation)

SkyWalking分布式系统应用程序性能监控工具-中

科目三: 济南章丘三号线
随机推荐
ApacheCon Asia 预热直播之孵化器主题全回顾
connman介绍
Source code analysis of openfeign
Chapter 4 决策树和随机森林
Ming min investment Qiu Huiming: behind the long-term excellence and excess, the test is the team's investment and research ability and the integrity of strategy
Do you really understand code rollback?
C语言力扣第43题之字符串相乘。优化竖式
分析一下CSDN大佬写的CAS,可重入锁, 非公平锁
[untitled]
Chapter 5 决策树和随机森林实践
The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode
Record the problem of PHP program accessing system files incorrectly
leetcode:433. 最小基因变化
Smart pointer shared_ ptr、unique_ ptr、weak_ ptr
Kettle reads file split by line
Alibaba cloud server domain name and port web page cannot access the problem record
GetObject call timing of factorybean
Implementation of API short message gateway based on golang
【安卓小叙】Kotlin多线程编程(一)
Meta Quest内容生态总监谈App Lab设计初衷