geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
geopm_sched.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef GEOPM_SCHED_H_INCLUDE
7 #define GEOPM_SCHED_H_INCLUDE
8 
9 #include <stdio.h>
10 #include "geopm_public.h"
11 
12 #ifdef __cplusplus
13 extern "C"
14 {
15 #endif
16 
17 #ifndef _GNU_SOURCE
18 #define _GNU_SOURCE
19 #endif
20 
21 #include <sched.h>
22 
23 int GEOPM_PUBLIC
24  geopm_sched_num_cpu(void);
25 
26 int GEOPM_PUBLIC
27  geopm_sched_get_cpu(void);
28 
29 int GEOPM_PUBLIC
30  geopm_sched_proc_cpuset(int num_cpu, cpu_set_t *proc_cpuset);
31 
32 int GEOPM_PUBLIC
33  geopm_sched_proc_cpuset_pid(int pid, int num_cpu, cpu_set_t *cpuset);
34 
35 int GEOPM_PUBLIC
36  geopm_sched_woomp(int num_cpu, cpu_set_t *woomp);
37 
38 #ifdef __cplusplus
39 }
40 #endif
41 
42 #endif
#define GEOPM_PUBLIC
Definition: geopm_public.h:10
int GEOPM_PUBLIC geopm_sched_proc_cpuset(int num_cpu, cpu_set_t *proc_cpuset)
Definition: geopm_sched.c:168
int GEOPM_PUBLIC geopm_sched_proc_cpuset_pid(int pid, int num_cpu, cpu_set_t *cpuset)
Definition: geopm_sched.c:113
int GEOPM_PUBLIC geopm_sched_num_cpu(void)
Definition: geopm_sched.c:26
int GEOPM_PUBLIC geopm_sched_get_cpu(void)
Definition: geopm_sched.c:31
int GEOPM_PUBLIC geopm_sched_woomp(int num_cpu, cpu_set_t *woomp)
Definition: geopm_sched.c:199