K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / src / linux-headers-3.13.0-24 / include / linux / sunrpc /
server ip : 104.21.89.46

your ip : 172.70.80.171

H O M E


Filename/usr/src/linux-headers-3.13.0-24/include/linux/sunrpc/timer.h
Size1.11 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:50
Last modified20-Jan-2014 10:40
Last accessed06-Jul-2025 03:03
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
/*
* linux/include/linux/sunrpc/timer.h
*
* Declarations for the RPC transport timer.
*
* Copyright (C) 2002 Trond Myklebust <[email protected]>
*/

#ifndef _LINUX_SUNRPC_TIMER_H
#define _LINUX_SUNRPC_TIMER_H

#include <linux/atomic.h>

struct rpc_rtt {
unsigned long timeo; /* default timeout value */
unsigned long srtt[5]; /* smoothed round trip time << 3 */
unsigned long sdrtt[5]; /* smoothed medium deviation of RTT */
int ntimeouts[5]; /* Number of timeouts for the last request */
};


extern void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo);
extern void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m);
extern unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer);

static inline void rpc_set_timeo(struct rpc_rtt *rt, int timer, int ntimeo)
{
int *t;
if (!timer)
return;
t = &rt->ntimeouts[timer-1];
if (ntimeo < *t) {
if (*t > 0)
(*t)--;
} else {
if (ntimeo > 8)
ntimeo = 8;
*t = ntimeo;
}
}

static inline int rpc_ntimeo(struct rpc_rtt *rt, int timer)
{
if (!timer)
return 0;
return rt->ntimeouts[timer-1];
}

#endif /* _LINUX_SUNRPC_TIMER_H */