summaryrefslogtreecommitdiffhomepage
path: root/Private/DriverKit/KernelCall.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-25 13:44:36 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-25 13:44:36 +0200
commit14f26421cc6ebd678c2b5a2a04fe6cdc63ee5d38 (patch)
tree45aa82d17f3c134b4e88851ab3be4ac7723e1bef /Private/DriverKit/KernelCall.c
parentd3c9b5287789534340146ffdb696f67aa8b7308d (diff)
MHR-16: Adding BDiskFormatFactory according to MHR-16, bug fixes and
improvements as well. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/DriverKit/KernelCall.c')
-rw-r--r--Private/DriverKit/KernelCall.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/Private/DriverKit/KernelCall.c b/Private/DriverKit/KernelCall.c
new file mode 100644
index 00000000..494ac0bc
--- /dev/null
+++ b/Private/DriverKit/KernelCall.c
@@ -0,0 +1,24 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+ Purpose: Kernel Definitions.
+
+------------------------------------------- */
+
+#include <DriverKit/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);
+
+}