1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FFRT_INNER_API_C_TASK_H 17 #define FFRT_INNER_API_C_TASK_H 18 #include "type_def.h" 19 20 /** 21 * @brief Skips a task. 22 * 23 * @param handle Indicates a task handle. 24 * @return Returns <b>0</b> if the task is skipped; 25 returns <b>-1</b> otherwise. 26 * @since 10 27 * @version 1.0 28 */ 29 FFRT_C_API int ffrt_skip(ffrt_task_handle_t handle); 30 31 // config 32 FFRT_C_API int ffrt_set_cgroup_attr(ffrt_qos_t qos, ffrt_os_sched_attr* attr); 33 FFRT_C_API int ffrt_set_cpu_worker_max_num(ffrt_qos_t qos, uint32_t num); 34 #endif 35