progress.h 480 B

1234567891011121314151617181920212223
  1. #ifndef _PERF_UI_PROGRESS_H_
  2. #define _PERF_UI_PROGRESS_H_ 1
  3. #include <linux/types.h>
  4. void ui_progress__finish(void);
  5. struct ui_progress {
  6. const char *title;
  7. u64 curr, next, step, total;
  8. };
  9. void ui_progress__init(struct ui_progress *p, u64 total, const char *title);
  10. void ui_progress__update(struct ui_progress *p, u64 adv);
  11. struct ui_progress_ops {
  12. void (*update)(struct ui_progress *p);
  13. void (*finish)(void);
  14. };
  15. extern struct ui_progress_ops *ui_progress__ops;
  16. #endif