# Copyright 2023 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

load(
    "//pw_build:compatibility.bzl",
    "incompatible_with_mcu",
    "minimum_cxx_20",
)
load(
    "//pw_build:pigweed.bzl",
    "pw_cc_test",
)

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

cc_library(
    name = "poll",
    hdrs = [
        "public/pw_async2/internal/poll_internal.h",
        "public/pw_async2/poll.h",
    ],
    includes = ["public"],
    deps = [
        "//pw_polyfill",
        "//pw_string:to_string",
        "//third_party/fuchsia:stdcompat",
    ],
)

pw_cc_test(
    name = "poll_test",
    srcs = ["poll_test.cc"],
    deps = [
        ":poll",
        "//pw_result",
    ],
)

# NOTE: this target should only be used directly by implementors of the
# `dispatcher` facade.
cc_library(
    name = "dispatcher_base",
    srcs = [
        "dispatcher_base.cc",
    ],
    hdrs = [
        "public/pw_async2/dispatcher_base.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":poll",
        "//pw_assert",
        "//pw_chrono:system_clock",
        "//pw_containers:vector",
        "//pw_sync:interrupt_spin_lock",
        "//pw_sync:lock_annotations",
        "//pw_sync:mutex",
        "//pw_toolchain:no_destructor",
    ],
)

cc_library(
    name = "dispatcher",
    hdrs = [
        "public/pw_async2/dispatcher.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":dispatcher_backend",
        ":dispatcher_base",
    ],
)

label_flag(
    name = "dispatcher_backend",
    build_setting_default = ":dispatcher_backend_multiplexer",
)

cc_library(
    name = "dispatcher_backend_multiplexer",
    visibility = ["//targets:__pkg__"],
    deps = select({
        "@platforms//os:linux": ["//pw_async2_epoll:dispatcher"],
        "//conditions:default": ["//pw_async2_basic:dispatcher"],
    }),
)

pw_cc_test(
    name = "dispatcher_test",
    srcs = ["dispatcher_test.cc"],
    deps = [":dispatcher"],
)

pw_cc_test(
    name = "dispatcher_thread_test",
    srcs = ["dispatcher_thread_test.cc"],
    # TODO: b/343776738 - update to run on all compatible devices
    target_compatible_with = incompatible_with_mcu(),
    deps = [
        ":dispatcher",
        "//pw_function",
        "//pw_thread:sleep",
        "//pw_thread:thread",
    ],
)

cc_library(
    name = "pend_func_task",
    hdrs = [
        "public/pw_async2/pend_func_task.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":dispatcher",
    ],
)

pw_cc_test(
    name = "pend_func_task_test",
    srcs = ["pend_func_task_test.cc"],
    deps = [":pend_func_task"],
)

cc_library(
    name = "pendable_as_task",
    hdrs = [
        "public/pw_async2/pendable_as_task.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":dispatcher",
    ],
)

pw_cc_test(
    name = "pendable_as_task_test",
    srcs = ["pendable_as_task_test.cc"],
    deps = [":pendable_as_task"],
)

cc_library(
    name = "allocate_task",
    hdrs = [
        "public/pw_async2/allocate_task.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":dispatcher",
        "//pw_allocator:allocator",
    ],
)

pw_cc_test(
    name = "allocate_task_test",
    srcs = ["allocate_task_test.cc"],
    deps = [
        ":allocate_task",
        "//pw_allocator:testing",
    ],
)

cc_library(
    name = "coro",
    hdrs = [
        "public/pw_async2/coro.h",
    ],
    includes = [
        "public",
    ],
    target_compatible_with = minimum_cxx_20(),
    deps = [
        ":dispatcher",
        "//pw_allocator:allocator",
    ],
)

pw_cc_test(
    name = "coro_test",
    srcs = ["coro_test.cc"],
    deps = [
        ":coro",
        ":dispatcher",
        "//pw_allocator:null_allocator",
        "//pw_allocator:testing",
    ],
)

cc_library(
    name = "coro_or_else_task",
    hdrs = [
        "public/pw_async2/coro_or_else_task.h",
    ],
    includes = [
        "public",
    ],
    deps = [
        ":coro",
        ":dispatcher",
        "//pw_function",
    ],
)

pw_cc_test(
    name = "coro_or_else_task_test",
    srcs = ["coro_or_else_task_test.cc"],
    deps = [
        ":coro",
        ":coro_or_else_task",
        ":dispatcher",
        "//pw_allocator:null_allocator",
        "//pw_allocator:testing",
    ],
)
