* FXIME: Following function is not standard interface.
* Following functions will be altered by the standard interface on later.
*
- * - int pass_get_num_cpus(void)
* - int pass_get_cpu_stats(struct pass_policy *policy)
* - int64_t pass_get_time_ms(void)
*/
-int pass_get_num_cpus(void)
-{
- int num_cpus;
- int ret;
-
- ret = sys_get_int("/sys/devices/system/cpu/kernel_max", &num_cpus);
- if (ret < 0)
- return -EAGAIN;
-
- /*
- * Return the number of cpus with plus 1 because of index
- * of first CPU is 0 (zero). (e.g., Octa cores have the '7' value
- * of "/sys/devices/system/cpu/kernel_max").
- */
- return (num_cpus + 1);
-}
/* Get the load_table of each resource to estimate the system load. */
int pass_get_cpu_stats(struct pass_policy *policy)
* FXIME: Following function is not standard interface.
* These functions will be altered by the standard interface on later.
*/
-int pass_get_num_cpus(void);
int pass_get_cpu_stats(struct pass_policy *policy);
int64_t pass_get_time_ms(void);