summaryrefslogtreecommitdiffhomepage
path: root/DDK/KernelCall.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-28 11:52:48 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-28 11:52:48 +0200
commit8f262d685126a9a9f68beb6d4002ba30bebae401 (patch)
tree6b4931b8e647bb4b9a8144ce385850eedb086bd9 /DDK/KernelCall.c
parent9db58da40cfcb6643412bfae25aefc0cd1077f9d (diff)
MHR-23: Improve scheduler code: Dont use 39, write kErrorProcessFault instead.
MHR-23: Improve filesystem structure. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'DDK/KernelCall.c')
-rw-r--r--DDK/KernelCall.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/DDK/KernelCall.c b/DDK/KernelCall.c
new file mode 100644
index 00000000..17e0b5d5
--- /dev/null
+++ b/DDK/KernelCall.c
@@ -0,0 +1,25 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+ Purpose: Kernel Definitions.
+
+------------------------------------------- */
+
+#include <DDK/KernelStd.h>
+#include <stdarg.h>
+
+DK_EXTERN __attribute__((naked)) void __kernelDispatchCall(int32_t cnt, ...);
+
+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);
+}