OpenBSDMachine.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef HEADER_OpenBSDMachine
  2. #define HEADER_OpenBSDMachine
  3. /*
  4. htop - OpenBSDMachine.h
  5. (C) 2014 Hisham H. Muhammad
  6. (C) 2015 Michael McConville
  7. Released under the GNU GPLv2+, see the COPYING file
  8. in the source distribution for its full text.
  9. */
  10. #include <kvm.h>
  11. #include <stdbool.h>
  12. #include <sys/types.h>
  13. #include "Machine.h"
  14. typedef struct CPUData_ {
  15. unsigned long long int totalTime;
  16. unsigned long long int userTime;
  17. unsigned long long int niceTime;
  18. unsigned long long int sysTime;
  19. unsigned long long int sysAllTime;
  20. unsigned long long int spinTime;
  21. unsigned long long int intrTime;
  22. unsigned long long int idleTime;
  23. unsigned long long int totalPeriod;
  24. unsigned long long int userPeriod;
  25. unsigned long long int nicePeriod;
  26. unsigned long long int sysPeriod;
  27. unsigned long long int sysAllPeriod;
  28. unsigned long long int spinPeriod;
  29. unsigned long long int intrPeriod;
  30. unsigned long long int idlePeriod;
  31. bool online;
  32. } CPUData;
  33. typedef struct OpenBSDMachine_ {
  34. Machine super;
  35. kvm_t* kd;
  36. CPUData* cpuData;
  37. long fscale;
  38. int cpuSpeed;
  39. int pageSize;
  40. int pageSizeKB;
  41. } OpenBSDMachine;
  42. #endif