2018-03-23 14:53:54 +01:00
|
|
|
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a BSD-style license
|
|
|
|
|
# that can be found in the LICENSE file in the root of the source
|
|
|
|
|
# tree. An additional intellectual property rights grant can be found
|
|
|
|
|
# in the file PATENTS. All contributing project authors may
|
|
|
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
|
2021-01-29 10:34:55 +00:00
|
|
|
import("//third_party/google_benchmark/buildconfig.gni")
|
2018-03-23 14:53:54 +01:00
|
|
|
import("../../webrtc.gni")
|
|
|
|
|
if (is_android) {
|
|
|
|
|
import("//build/config/android/config.gni")
|
|
|
|
|
import("//build/config/android/rules.gni")
|
|
|
|
|
}
|
2020-06-04 00:41:20 +02:00
|
|
|
|
|
|
|
|
rtc_library("yield") {
|
|
|
|
|
sources = [
|
|
|
|
|
"yield.cc",
|
|
|
|
|
"yield.h",
|
|
|
|
|
]
|
|
|
|
|
deps = []
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-07 16:19:15 +02:00
|
|
|
rtc_source_set("mutex") {
|
2020-06-04 00:41:20 +02:00
|
|
|
sources = [
|
|
|
|
|
"mutex.h",
|
|
|
|
|
"mutex_critical_section.h",
|
|
|
|
|
"mutex_pthread.h",
|
|
|
|
|
]
|
2020-06-05 11:47:40 +02:00
|
|
|
if (rtc_use_absl_mutex) {
|
|
|
|
|
sources += [ "mutex_abseil.h" ]
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-04 00:41:20 +02:00
|
|
|
deps = [
|
|
|
|
|
":yield",
|
|
|
|
|
"..:checks",
|
|
|
|
|
"..:macromagic",
|
2020-06-10 15:40:42 +02:00
|
|
|
"..:platform_thread_types",
|
2021-07-26 17:16:25 +02:00
|
|
|
"../system:no_unique_address",
|
2020-06-04 00:41:20 +02:00
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ]
|
2020-06-05 11:47:40 +02:00
|
|
|
if (rtc_use_absl_mutex) {
|
2020-06-05 14:30:41 +02:00
|
|
|
absl_deps += [ "//third_party/abseil-cpp/absl/synchronization" ]
|
2020-06-05 11:47:40 +02:00
|
|
|
}
|
2020-06-04 00:41:20 +02:00
|
|
|
}
|
2018-03-23 14:53:54 +01:00
|
|
|
|
2021-02-03 16:23:47 +01:00
|
|
|
rtc_library("sequence_checker_internal") {
|
2021-02-04 15:06:50 +01:00
|
|
|
visibility = [ "../../api:sequence_checker" ]
|
2019-03-29 10:34:45 +01:00
|
|
|
sources = [
|
2021-02-03 16:23:47 +01:00
|
|
|
"sequence_checker_internal.cc",
|
|
|
|
|
"sequence_checker_internal.h",
|
2019-03-29 10:34:45 +01:00
|
|
|
]
|
|
|
|
|
deps = [
|
2020-07-08 17:55:58 +02:00
|
|
|
":mutex",
|
2019-03-29 10:34:45 +01:00
|
|
|
"..:checks",
|
|
|
|
|
"..:macromagic",
|
|
|
|
|
"..:platform_thread_types",
|
2020-06-08 23:08:46 +02:00
|
|
|
"..:stringutils",
|
2019-03-29 10:34:45 +01:00
|
|
|
"../../api/task_queue",
|
2019-09-23 14:54:28 +02:00
|
|
|
"../system:rtc_export",
|
2019-03-29 10:34:45 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
rtc_library("yield_policy") {
|
2019-03-20 16:50:35 +01:00
|
|
|
sources = [
|
|
|
|
|
"yield_policy.cc",
|
|
|
|
|
"yield_policy.h",
|
|
|
|
|
]
|
2020-06-05 14:30:41 +02:00
|
|
|
deps = [ "..:checks" ]
|
|
|
|
|
absl_deps = [
|
2019-07-19 07:03:03 -07:00
|
|
|
"//third_party/abseil-cpp/absl/base:config",
|
2019-03-20 16:50:35 +01:00
|
|
|
"//third_party/abseil-cpp/absl/base:core_headers",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (rtc_include_tests) {
|
2021-01-29 10:34:55 +00:00
|
|
|
if (enable_google_benchmarks) {
|
|
|
|
|
rtc_library("synchronization_unittests") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [
|
|
|
|
|
"mutex_unittest.cc",
|
|
|
|
|
"yield_policy_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
deps = [
|
|
|
|
|
":mutex",
|
|
|
|
|
":yield",
|
|
|
|
|
":yield_policy",
|
|
|
|
|
"..:checks",
|
|
|
|
|
"..:macromagic",
|
2022-04-14 12:18:28 +02:00
|
|
|
"..:platform_thread",
|
2021-01-29 10:34:55 +00:00
|
|
|
"..:rtc_base",
|
|
|
|
|
"..:rtc_event",
|
|
|
|
|
"..:threading",
|
|
|
|
|
"../../test:test_support",
|
|
|
|
|
"//third_party/google_benchmark",
|
|
|
|
|
]
|
|
|
|
|
}
|
2020-06-04 00:41:20 +02:00
|
|
|
|
2021-01-29 10:34:55 +00:00
|
|
|
rtc_library("mutex_benchmark") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = [ "mutex_benchmark.cc" ]
|
|
|
|
|
deps = [
|
|
|
|
|
":mutex",
|
|
|
|
|
"../system:unused",
|
|
|
|
|
"//third_party/google_benchmark",
|
|
|
|
|
]
|
|
|
|
|
}
|
2019-03-20 16:50:35 +01:00
|
|
|
}
|
|
|
|
|
}
|