信号完结
This commit is contained in:
26
C16-并发/parallel/signal/mytbf_sa/mytbf.h
Normal file
26
C16-并发/parallel/signal/mytbf_sa/mytbf.h
Normal 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__
|
||||
Reference in New Issue
Block a user