summaryrefslogtreecommitdiffhomepage
path: root/DDK/KernelCall.c
blob: 7dc5761c30f3b1c53a5fbceb52304b4b790c876a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* -------------------------------------------

	Copyright Zeta Electronics Corporation

	Purpose: Kernel Definitions.

------------------------------------------- */

#include <DDK/KernelStd.h>
#include <stdarg.h>

/// @brief this is an internal call, do not use it.
DK_EXTERN __attribute__((naked)) void* __kernelDispatchCall(const char* name, int32_t cnt, void* data, size_t sz);

/// @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, void* data, size_t sz)
{
	if (!kernelRpcName || cnt == 0)
		return NIL;

	return __kernelDispatchCall(kernelRpcName, cnt, data, sz);
}