Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
00001 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __RAPICORN_CPU_HH__ 00003 #define __RAPICORN_CPU_HH__ 00004 00005 #include <rcore/utilities.hh> 00006 00007 namespace Rapicorn { 00008 00010 struct CPUInfo { 00011 // architecture name 00012 const char *machine; 00013 // CPU Vendor ID 00014 const char *cpu_vendor; 00015 // CPU features on X86 00016 uint x86_fpu : 1, x86_ssesys : 1, x86_tsc : 1, x86_htt : 1; 00017 uint x86_mmx : 1, x86_mmxext : 1, x86_3dnow : 1, x86_3dnowext : 1; 00018 uint x86_sse : 1, x86_sse2 : 1, x86_sse3 : 1, x86_ssse3 : 1; 00019 uint x86_cx16 : 1, x86_sse4_1 : 1, x86_sse4_2 : 1; 00020 }; 00021 00022 CPUInfo cpu_info (void); 00023 String cpu_info_string (const CPUInfo &cpu_info); 00024 00026 struct TaskStatus { 00027 enum State { UNKNOWN = '?', RUNNING = 'R', SLEEPING = 'S', DISKWAIT = 'D', STOPPED = 'T', PAGING = 'W', ZOMBIE = 'Z', DEBUG = 'X', }; 00028 int process_id; 00029 int task_id; 00030 String name; 00031 State state; 00032 int processor; 00033 int priority; 00034 uint64 utime; 00035 uint64 stime; 00036 uint64 cutime; 00037 uint64 cstime; 00038 uint64 ac_stamp; 00039 uint64 ac_utime, ac_stime, ac_cutime, ac_cstime; 00040 explicit TaskStatus (int pid, int tid = -1); 00041 bool update (); 00042 String string (); 00043 }; 00044 00045 } // Rapicorn 00046 00047 #endif /* __RAPICORN_CPU_HH__ */