⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timer.h

📁 这个linux源代码是很全面的~基本完整了~使用c编译的~由于时间问题我没有亲自测试~但就算用来做参考资料也是非常好的
💻 H
字号:
/* *  linux/include/linux/sunrpc/timer.h * *  Declarations for the RPC transport timer. * *  Copyright (C) 2002 Trond Myklebust <trond.myklebust@fys.uio.no> */#ifndef _LINUX_SUNRPC_TIMER_H#define _LINUX_SUNRPC_TIMER_H#include <asm/atomic.h>struct rpc_rtt {	long timeo;		/* default timeout value */	long srtt[5];		/* smoothed round trip time << 3 */	long sdrtt[5];		/* soothed medium deviation of RTT */	atomic_t  ntimeouts;	/* Global count of the number of timeouts */};extern void rpc_init_rtt(struct rpc_rtt *rt, long timeo);extern void rpc_update_rtt(struct rpc_rtt *rt, int timer, long m);extern long rpc_calc_rto(struct rpc_rtt *rt, int timer);static inline void rpc_inc_timeo(struct rpc_rtt *rt){	atomic_inc(&rt->ntimeouts);}static inline void rpc_clear_timeo(struct rpc_rtt *rt){	atomic_set(&rt->ntimeouts, 0);}static inline int rpc_ntimeo(struct rpc_rtt *rt){	return atomic_read(&rt->ntimeouts);}#endif /* _LINUX_SUNRPC_TIMER_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -