| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _CPUDESC_H |
| 18 |
#define _CPUDESC_H |
| 19 |
|
| 20 |
#include "system.h" |
| 21 |
|
| 22 |
#ifdef __cplusplus |
| 23 |
extern "C" |
| 24 |
{ |
| 25 |
#endif |
| 26 |
|
| 27 |
|
| 28 |
bool get_processor_is_hot_pluggable (unsigned int cpu); |
| 29 |
int get_processor_is_online (unsigned int cpu); |
| 30 |
|
| 31 |
struct cpu_desc; |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
int cpu_desc_new (struct cpu_desc **cpudesc); |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
void cpu_desc_read (struct cpu_desc * __restrict cpudesc); |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
struct cpu_desc *cpu_desc_unref (struct cpu_desc *cpudesc); |
| 44 |
|
| 45 |
|
| 46 |
char *cpu_desc_get_architecture (struct cpu_desc *cpudesc); |
| 47 |
char *cpu_desc_get_vendor (struct cpu_desc *cpudesc); |
| 48 |
char *cpu_desc_get_family (struct cpu_desc *cpudesc); |
| 49 |
char *cpu_desc_get_model (struct cpu_desc *cpudesc); |
| 50 |
char *cpu_desc_get_model_name (struct cpu_desc *cpudesc); |
| 51 |
char *cpu_desc_get_virtualization_flag (struct cpu_desc *cpudesc); |
| 52 |
char *cpu_desc_get_mhz (struct cpu_desc *cpudesc); |
| 53 |
char *cpu_desc_get_flags (struct cpu_desc *cpudesc); |
| 54 |
|
| 55 |
enum |
| 56 |
{ |
| 57 |
MODE_32BIT = (1 << 1), |
| 58 |
MODE_64BIT = (1 << 2) |
| 59 |
}; |
| 60 |
int cpu_desc_get_mode (struct cpu_desc *cpudesc); |
| 61 |
|
| 62 |
int cpu_desc_get_ncpus (struct cpu_desc *cpudesc); |
| 63 |
int cpu_desc_get_ncpuspos (struct cpu_desc *cpudesc); |
| 64 |
int cpu_desc_get_nthreads (struct cpu_desc *cpudesc); |
| 65 |
|
| 66 |
#ifdef __cplusplus |
| 67 |
} |
| 68 |
#endif |
| 69 |
|
| 70 |
#endif |