| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef SANITIZER_OFFLOAD_RPC_H |
| 10 | #define SANITIZER_OFFLOAD_RPC_H |
| 11 | |
| 12 | #include "sanitizer_offload.h" |
| 13 | |
| 14 | namespace __sanitizer { |
| 15 | |
| 16 | struct OffloadRpc { |
| 17 | static void Start(Offload& O, hsa_executable_t Exec); |
| 18 | static void Stop(Offload& O); |
| 19 | |
| 20 | private: |
| 21 | friend class Offload; |
| 22 | |
| 23 | static void RegisterHandler(Offload::Handler Fn); |
| 24 | static void Flush(); |
| 25 | static void* ServerLoop(void* Arg); |
| 26 | }; |
| 27 | |
| 28 | } // namespace __sanitizer |
| 29 | |
| 30 | #endif // SANITIZER_OFFLOAD_RPC_H |
| 31 | |