19101ba0f4
about syscall parameters. Particularly interesting is a type_code field for each parameter. The mechanism isn't very accurate, but we can classify everything in string, pointer, and integer types. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23618 a95241bf-73f2-0310-859d-f6bbb57e9c96
50 lines
1.0 KiB
C
50 lines
1.0 KiB
C
/*
|
|
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
** Distributed under the terms of the NewOS License.
|
|
*/
|
|
#ifndef _KERNEL_KSYSCALLS_H
|
|
#define _KERNEL_KSYSCALLS_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
#define MAX_SYSCALL_PARAMETERS 16
|
|
|
|
|
|
typedef struct syscall_info {
|
|
void *function; // pointer to the syscall function
|
|
int parameter_size; // summed up parameter size
|
|
} syscall_info;
|
|
|
|
typedef struct syscall_parameter_info {
|
|
int offset;
|
|
int size;
|
|
int used_size;
|
|
type_code type;
|
|
} syscall_parameter_info;
|
|
|
|
typedef struct syscall_parameters_info {
|
|
int parameter_count;
|
|
syscall_parameter_info parameters[MAX_SYSCALL_PARAMETERS];
|
|
} syscall_parameters_info;
|
|
|
|
|
|
extern const int kSyscallCount;
|
|
extern const syscall_info kSyscallInfos[];
|
|
extern const syscall_parameters_info kSyscallParametersInfos[];
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int32 syscall_dispatcher(uint32 function, void *argBuffer, uint64 *_returnValue);
|
|
status_t generic_syscall_init(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _KERNEL_KSYSCALLS_H */
|