utils.h (a957cbc02531a23beeac6dd9e751f8d4dadaf7a9) | utils.h (272ced2556e63943113a54c113f8c11aeb53a5c3) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 | 1// SPDX-License-Identifier: GPL-2.0 |
2 |
|
2#include <stdint.h> 3#include <time.h> | 3#include <stdint.h> 4#include <time.h> |
5#include <sched.h> |
|
4 5/* 6 * '18446744073709551615\0' 7 */ 8#define BUFF_U64_STR_SIZE 24 9#define MAX_PATH 1024 10 11#define container_of(ptr, type, member)({ \ --- 37 unchanged lines hidden (view full) --- 49 int32_t sched_nice; 50 uint32_t sched_priority; 51 uint64_t sched_runtime; 52 uint64_t sched_deadline; 53 uint64_t sched_period; 54}; 55 56int parse_prio(char *arg, struct sched_attr *sched_param); | 6 7/* 8 * '18446744073709551615\0' 9 */ 10#define BUFF_U64_STR_SIZE 24 11#define MAX_PATH 1024 12 13#define container_of(ptr, type, member)({ \ --- 37 unchanged lines hidden (view full) --- 51 int32_t sched_nice; 52 uint32_t sched_priority; 53 uint64_t sched_runtime; 54 uint64_t sched_deadline; 55 uint64_t sched_period; 56}; 57 58int parse_prio(char *arg, struct sched_attr *sched_param); |
59int parse_cpu_set(char *cpu_list, cpu_set_t *set); |
|
57int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr); 58int set_comm_cgroup(const char *comm_prefix, const char *cgroup); 59int set_cpu_dma_latency(int32_t latency); 60 61#define ns_to_usf(x) (((double)x/1000)) 62#define ns_to_per(total, part) ((part * 100) / (double)total) | 60int set_comm_sched_attr(const char *comm_prefix, struct sched_attr *attr); 61int set_comm_cgroup(const char *comm_prefix, const char *cgroup); 62int set_cpu_dma_latency(int32_t latency); 63 64#define ns_to_usf(x) (((double)x/1000)) 65#define ns_to_per(total, part) ((part * 100) / (double)total) |