| # Copyright 2019 The Fuchsia Authors | 
 | # | 
 | # Use of this source code is governed by a MIT-style | 
 | # license that can be found in the LICENSE file or at | 
 | # https://opensource.org/licenses/MIT | 
 |  | 
 | zx_library("object") { | 
 |   kernel = true | 
 |   sources = [ | 
 |     "buffer_chain.cc", | 
 |     "bus_transaction_initiator_dispatcher.cc", | 
 |     "channel_dispatcher.cc", | 
 |     "clock_dispatcher.cc", | 
 |     "diagnostics.cc", | 
 |     "dispatcher.cc", | 
 |     "event_dispatcher.cc", | 
 |     "event_pair_dispatcher.cc", | 
 |     "exception.cc", | 
 |     "exception_dispatcher.cc", | 
 |     "exceptionate.cc", | 
 |     "executor.cc", | 
 |     "fifo_dispatcher.cc", | 
 |     "futex_context.cc", | 
 |     "guest_dispatcher.cc", | 
 |     "handle.cc", | 
 |     "interrupt_dispatcher.cc", | 
 |     "interrupt_event_dispatcher.cc", | 
 |     "iommu_dispatcher.cc", | 
 |     "job_dispatcher.cc", | 
 |     "job_policy.cc", | 
 |     "log_dispatcher.cc", | 
 |     "mbuf.cc", | 
 |     "memory_watchdog.cc", | 
 |     "message_packet.cc", | 
 |     "msi_allocation.cc", | 
 |     "msi_dispatcher.cc", | 
 |     "pager_dispatcher.cc", | 
 |     "pci_device_dispatcher.cc", | 
 |     "pci_interrupt_dispatcher.cc", | 
 |     "pinned_memory_token_dispatcher.cc", | 
 |     "port_dispatcher.cc", | 
 |     "process_dispatcher.cc", | 
 |     "profile_dispatcher.cc", | 
 |     "resource.cc", | 
 |     "resource_dispatcher.cc", | 
 |     "root_job_observer.cc", | 
 |     "singleton.cc", | 
 |     "socket_dispatcher.cc", | 
 |     "stream_dispatcher.cc", | 
 |     "suspend_token_dispatcher.cc", | 
 |     "thread_dispatcher.cc", | 
 |     "timer_dispatcher.cc", | 
 |     "user_handles.cc", | 
 |     "vcpu_dispatcher.cc", | 
 |     "virtual_interrupt_dispatcher.cc", | 
 |     "vm_address_region_dispatcher.cc", | 
 |     "vm_object_dispatcher.cc", | 
 |     "wait_state_observer.cc", | 
 |   ] | 
 |   deps = [ | 
 |     ":tests", | 
 |     "$zx/kernel/dev/interrupt", | 
 |     "$zx/kernel/dev/iommu/dummy", | 
 |     "$zx/kernel/dev/pcie", | 
 |     "$zx/kernel/hypervisor", | 
 |     "$zx/kernel/lib/arch", | 
 |     "$zx/kernel/lib/cmdline", | 
 |     "$zx/kernel/lib/console", | 
 |     "$zx/kernel/lib/counters", | 
 |     "$zx/kernel/lib/crashlog", | 
 |     "$zx/kernel/lib/fbl", | 
 |     "$zx/kernel/lib/init", | 
 |     "$zx/kernel/lib/ktl", | 
 |     "$zx/kernel/lib/ktrace", | 
 |     "$zx/system/ulib/pretty", | 
 |     "$zx/system/ulib/region-alloc", | 
 |     "$zx/system/ulib/zxc", | 
 |   ] | 
 |   if (current_cpu == "x64") { | 
 |     deps += [ "$zx/kernel/dev/iommu/intel" ] | 
 |   } | 
 |   public_deps = [ | 
 |     # <object/buffer_chain.h> has #include <ktl/move.h>. | 
 |     "$zx/kernel/lib/ktl:headers", | 
 |  | 
 |     # <object/pci_device_dispatcher.h> has #include <dev/pci_common.h> | 
 |     "$zx/kernel/dev/pcie:headers", | 
 |  | 
 |     # <object/log_dispatcher.h> has #include <lib/debuglog.h>. | 
 |     "$zx/kernel/lib/debuglog:headers", | 
 |  | 
 |     # <object/resource_dispatcher.h> has #include <region-alloc/region-alloc.h>. | 
 |     "$zx/system/ulib/region-alloc:headers", | 
 |  | 
 |     # <object/vcpu_dispatcher.h> has #include <hypervisor/interrupt_tracker.h>. | 
 |     #"$zx/kernel/hypervisor:headers", | 
 |  | 
 |     # <object/process_dispatcher.h> has #include <vm/vm_aspace.h>. | 
 |     "$zx/kernel/vm:headers", | 
 |  | 
 |     # <object/clock_dispatcher.h> has #include <lib/affine/transform.h>. | 
 |     "$zx/system/ulib/affine", | 
 |   ] | 
 | } | 
 |  | 
 | source_set("tests") { | 
 |   # TODO: testonly = true | 
 |   sources = [ | 
 |     "buffer_chain_tests.cc", | 
 |     "exceptionate_tests.cc", | 
 |     "handle_tests.cc", | 
 |     "interrupt_event_dispatcher_tests.cc", | 
 |     "job_dispatcher_tests.cc", | 
 |     "job_policy_tests.cc", | 
 |     "mbuf_tests.cc", | 
 |     "message_packet_tests.cc", | 
 |     "msi_object_tests.cc", | 
 |     "root_job_observer_tests.cc", | 
 |     "socket_dispatcher_tests.cc", | 
 |     "state_tracker_tests.cc", | 
 |   ] | 
 |   deps = [ | 
 |     ":headers", | 
 |     "$zx/kernel/lib/console", | 
 |     "$zx/kernel/lib/ktl", | 
 |     "$zx/kernel/lib/unittest", | 
 |   ] | 
 | } |