2002-07-09 16:24:59 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
** Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
2004-12-14 19:06:34 +03:00
|
|
|
#ifndef _KERNEL_KSYSCALLS_H
|
|
|
|
#define _KERNEL_KSYSCALLS_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-16 20:17:28 +04:00
|
|
|
|
2004-12-14 18:46:53 +03:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
2008-01-18 22:25:28 +03:00
|
|
|
#define MAX_SYSCALL_PARAMETERS 16
|
|
|
|
|
|
|
|
|
2008-01-11 03:36:44 +03:00
|
|
|
typedef struct syscall_info {
|
2005-02-11 07:54:35 +03:00
|
|
|
void *function; // pointer to the syscall function
|
|
|
|
int parameter_size; // summed up parameter size
|
|
|
|
} syscall_info;
|
|
|
|
|
2008-01-18 22:25:28 +03:00
|
|
|
typedef struct syscall_parameter_info {
|
|
|
|
int offset;
|
|
|
|
int size;
|
|
|
|
int used_size;
|
|
|
|
type_code type;
|
|
|
|
} syscall_parameter_info;
|
|
|
|
|
2008-01-21 18:29:00 +03:00
|
|
|
typedef struct extended_syscall_info {
|
|
|
|
const char* name;
|
2008-01-18 22:25:28 +03:00
|
|
|
int parameter_count;
|
|
|
|
syscall_parameter_info parameters[MAX_SYSCALL_PARAMETERS];
|
2008-01-21 18:29:00 +03:00
|
|
|
} extended_syscall_info;
|
2008-01-18 22:25:28 +03:00
|
|
|
|
|
|
|
|
2005-02-11 07:54:35 +03:00
|
|
|
extern const int kSyscallCount;
|
|
|
|
extern const syscall_info kSyscallInfos[];
|
2008-01-21 18:29:00 +03:00
|
|
|
extern const extended_syscall_info kExtendedSyscallInfos[];
|
2005-02-11 07:54:35 +03:00
|
|
|
|
|
|
|
|
2004-12-14 18:46:53 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int32 syscall_dispatcher(uint32 function, void *argBuffer, uint64 *_returnValue);
|
|
|
|
status_t generic_syscall_init(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2004-12-14 19:06:34 +03:00
|
|
|
#endif /* _KERNEL_KSYSCALLS_H */
|