• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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("../cgroup_sched.gni")
16
17config("cgroup_sched_public_config") {
18  include_dirs = [ "../interfaces/innerkits/include" ]
19}
20
21config("cgroup_sched_private_config") {
22  include_dirs = [
23    "../../ressched/interfaces/innerkits/ressched_client/include",
24    "../common/include",
25    "./sched_controller/include",
26    "./utils/include",
27  ]
28}
29
30ohos_shared_library("cgroup_sched") {
31  public_configs = [ ":cgroup_sched_public_config" ]
32
33  configs = [ ":cgroup_sched_private_config" ]
34
35  sources = [
36    "${cgroup_sched_common}/cgroup_sched_log.cpp",
37    "sched_controller/app_state_observer.cpp",
38    "sched_controller/cgroup_adjuster.cpp",
39    "sched_controller/cgroup_event_handler.cpp",
40    "sched_controller/sched_controller.cpp",
41    "sched_controller/supervisor.cpp",
42    "sched_controller/window_state_observer.cpp",
43    "utils/ressched_utils.cpp",
44  ]
45
46  deps = [ "./process_group:libprocess_group" ]
47
48  external_deps = [
49    "ability_runtime:app_manager",
50    "ability_runtime:wantagent_innerkits",
51    "c_utils:utils",
52    "common_event_service:cesfwk_innerkits",
53    "eventhandler:libeventhandler",
54    "hilog:libhilog",
55    "hisysevent:libhisysevent",
56    "hitrace:hitrace_meter",
57    "ipc:ipc_single",
58    "samgr:samgr_proxy",
59    "window_manager:libwm",
60  ]
61
62  if (has_bg_task_mgr) {
63    defines = [ "CONFIG_BGTASK_MGR" ]
64    sources += [ "sched_controller/background_task_observer.cpp" ]
65    external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ]
66  }
67
68  part_name = "resource_schedule_service"
69  subsystem_name = "resourceschedule"
70}
71