#ifndef _LINUX_AVERAGE_H#define _LINUX_AVERAGE_H/* Exponentially weighted moving average (EWMA) *//* For more documentation see lib/average.c */structewma{unsignedlonginternal;unsignedlongfactor;unsignedlongweight;};externvoidewma_init(structewma*avg,unsignedlongfactor,unsignedlongweight);externstructewma*ewma_add(structewma*avg,unsignedlongval);/** * ewma_read() - Get average value * @avg: Average structure * * Returns the average value held in @avg. */staticinlineunsignedlongewma_read(conststructewma*avg){returnavg->internal>>avg->factor;}#endif /* _LINUX_AVERAGE_H */