• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import(
16    "//foundation/resourceschedule/resource_schedule_service/cgroup_sched/cgroup_sched.gni")
17
18ohos_shared_library("cgroup_sched") {
19  sources = [
20    "${cgroup_sched_common}/cgroup_sched_log.cpp",
21    "sched_controller/app_state_observer.cpp",
22    "sched_controller/cgroup_adjuster.cpp",
23    "sched_controller/cgroup_event_handler.cpp",
24    "sched_controller/sched_controller.cpp",
25    "sched_controller/supervisor.cpp",
26    "sched_controller/window_state_observer.cpp",
27    "utils/ressched_utils.cpp",
28  ]
29  configs = [ "//foundation/ability/ability_runtime/interfaces/inner_api/wantagent:wantagent_innerkits_public_config" ]
30  include_dirs = [
31    "../../ressched/interfaces/innerkits/ressched_client/include",
32    "../common/include",
33    "./sched_controller/include",
34    "./utils/include",
35  ]
36  deps = [ "./process_group:libprocess_group" ]
37  external_deps = [
38    "ability_runtime:app_manager",
39    "c_utils:utils",
40    "eventhandler:libeventhandler",
41    "hitrace_native:hitrace_meter",
42    "hiviewdfx_hilog_native:libhilog",
43    "ipc:ipc_core",
44    "samgr:samgr_proxy",
45    "window_manager:libwm",
46  ]
47
48  if (has_bg_task_mgr) {
49    defines = [ "CONFIG_BGTASK_MGR" ]
50    sources += [ "sched_controller/background_task_observer.cpp" ]
51    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
52  }
53
54  part_name = "resource_schedule_service"
55  subsystem_name = "resourceschedule"
56}
57