2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
5 #ifndef _KERNEL_KSYSCALLS_H
6 #define _KERNEL_KSYSCALLS_H
9 #include <SupportDefs.h>
12 #define MAX_SYSCALL_PARAMETERS 16
15 typedef struct syscall_info
{
16 void *function
; // pointer to the syscall function
17 int parameter_size
; // summed up parameter size
20 typedef struct syscall_parameter_info
{
25 } syscall_parameter_info
;
27 typedef struct syscall_return_type_info
{
31 } syscall_return_type_info
;
33 typedef struct extended_syscall_info
{
36 syscall_return_type_info return_type
;
37 syscall_parameter_info parameters
[MAX_SYSCALL_PARAMETERS
];
38 } extended_syscall_info
;
41 extern const int kSyscallCount
;
42 extern const syscall_info kSyscallInfos
[];
43 extern const extended_syscall_info kExtendedSyscallInfos
[];
50 int32
syscall_dispatcher(uint32 function
, void *argBuffer
, uint64
*_returnValue
);
51 status_t
generic_syscall_init(void);
57 #endif /* _KERNEL_KSYSCALLS_H */