信号完结

This commit is contained in:
lzy
2024-05-27 02:28:25 +08:00
parent a57bbdb4c1
commit 2336f88407
9 changed files with 703 additions and 8 deletions

View File

@@ -0,0 +1,26 @@
/***********************************************************************
* @file mytbf.h
* @brief
* 令牌桶库
*
* @author lzy (lllzzzyyy@buaa.edu.cn)
* @url https://lzyyyyyy.fun
*
* @date 2024-05-26
*
***********************************************************************/
#ifndef __MYTBF__H__
#define __MYTBF__H__
#define MYTBF_MAX 1024
typedef void mytbf_t;
mytbf_t* mytbf_init(int cps, int burst);
int mytbf_fetchtoken(mytbf_t*, int);
int mytbf_returntoken(mytbf_t*, int);
int mytbf_destroy(mytbf_t*);
#endif //!__MYTBF__H__