diff options
Diffstat (limited to 'DDK/KernelCall.c')
| -rw-r--r-- | DDK/KernelCall.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/DDK/KernelCall.c b/DDK/KernelCall.c new file mode 100644 index 00000000..26a0b83b --- /dev/null +++ b/DDK/KernelCall.c @@ -0,0 +1,30 @@ +/* ------------------------------------------- + + Copyright SoftwareLabs + + Purpose: Kernel Definitions. + +------------------------------------------- */ + +#include <DDK/KernelStd.h> +#include <stdarg.h> + +DK_EXTERN __attribute__((naked)) void __kernelDispatchCall(int32_t cnt, ...); + +/// @brief Execute a function on the kernel. +/// @param kernelRpcName the name of the function. +/// @param cnt number of arguments. +/// @param +/// @return +DK_EXTERN void* kernelCall(const char* kernelRpcName, int32_t cnt, ...) +{ + if (!kernelRpcName || cnt == 0) + return NIL; + + va_list arg; + va_start(arg, cnt); + + __kernelDispatchCall(cnt, arg); + + va_end(arg); +} |
