NetBSDMachine.h 1.2 KB

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