#include "lib.h" // Call static Trampoline::Error trampoline(const uint32_t id, uint32_t *ret, const uint32_t length, const unsigned char *args) { // Check Arguments Length if (length > MAX_TRAMPOLINE_ARGS_SIZE) { return Trampoline::Error::COMMAND_TOO_BIG; } // Configure Method static bool use_syscall = SyscallTrampoline::should_use(); // Use Correct Method if (use_syscall) { static SyscallTrampoline syscall; return syscall.call(id, ret, length, args); } else { static PipeTrampoline pipe; return pipe.call(id, ret, length, args); } } uint32_t raw_trampoline(const uint32_t id, uint32_t *ret, const uint32_t length, const unsigned char *args) { return uint32_t(trampoline(id, ret, length, args)); }