progress.h 482 Bytes
Newer Older
1 2 3
#ifndef _PERF_UI_PROGRESS_H_
#define _PERF_UI_PROGRESS_H_ 1

Borislav Petkov's avatar
Borislav Petkov committed
4
#include <linux/types.h>
5

6 7 8 9 10 11 12 13 14 15
void ui_progress__finish(void);
 
struct ui_progress {
	const char *title;
	u64 curr, next, step, total;
};
 
void ui_progress__init(struct ui_progress *p, u64 total, const char *title);
void ui_progress__update(struct ui_progress *p, u64 adv);

16
struct ui_progress_ops {
17
	void (*update)(struct ui_progress *p);
18
	void (*finish)(void);
19 20
};

21
extern struct ui_progress_ops *ui_progress__ops;
22

23
#endif