master
h 15 lines 707 Bytes
Raw
1 // Copyright (C) Microsoft Corporation. All rights reserved.
2 #pragma once
3
4 #include <type_traits>
5 #include <source_location>
6
7 template <typename Routine, typename... Args>
8 typename std::invoke_result<Routine, Args...>::type _Syscall(const std::source_location& source, Routine routine, Args... args);
9 #define Syscall(...) _Syscall(std::source_location::current(), __VA_ARGS__)
10
11 template <typename Routine, typename... Args>
12 typename std::invoke_result<Routine, Args...>::type _SyscallInterruptable(const std::source_location& source, Routine routine, Args... args);
13 #define SyscallInterruptable(...) _SyscallInterruptable(std::source_location::current(), __VA_ARGS__)
14
15 #include "Syscall.hxx"