Init basesystem source codes.
[staging/basesystem.git] / nsframework / common_library / client / include / cl_cgroup.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef _cl_cgroup_h_  // NOLINT(build/header_guard)
18 #define _cl_cgroup_h_  // NOLINT(build/header_guard)
19
20 typedef enum {
21   CL_CGROUP_MEMORY,
22   CL_CGROUP_CPU,
23 } cl_cgroup_t;
24
25 int cl_cgroup_make(cl_cgroup_t cgroup, const char *cgroup_name);  // NOLINT(readability/nolint)
26 int cl_cgroup_remove(cl_cgroup_t cgroup, const char *cgroup_name);  // NOLINT(readability/nolint)
27 int cl_cgroup_exist(cl_cgroup_t cgroup, const char *cgroup_name);  // NOLINT(readability/nolint)
28 int cl_cgroup_open(cl_cgroup_t cgroup, const char *cgroup_name,  // NOLINT(readability/nolint)
29                    const char *controler, int flags);
30 int cl_cgroup_set_string(cl_cgroup_t cgroup, const char *cgroup_name,  // NOLINT(readability/nolint)
31                          const char *controler, const char *str);
32 int cl_cgroup_set_num(cl_cgroup_t cgroup, const char *cgroup_name,  // NOLINT(readability/nolint)
33                       const char *controler, int64_t value);
34
35 #endif  // ifndef _cl_cgroup_h_  // NOLINT(build/header_guard)