2004-12-14 18:46:53 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_GENERIC_SYSCALLS_H
|
|
|
|
#define _KERNEL_GENERIC_SYSCALLS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
2008-05-14 07:55:16 +04:00
|
|
|
#include <generic_syscall_defs.h>
|
|
|
|
|
2004-12-14 18:46:53 +03:00
|
|
|
|
|
|
|
/* If we decide to make this API public, the contents of this file
|
|
|
|
* should be moved to KernelExport.h
|
|
|
|
*/
|
|
|
|
|
2004-12-14 20:09:06 +03:00
|
|
|
typedef status_t (*syscall_hook)(const char *subsystem, uint32 function, void *buffer, size_t bufferSize);
|
2004-12-14 18:46:53 +03:00
|
|
|
|
|
|
|
/* syscall flags */
|
|
|
|
#define B_SYSCALL_NOT_REPLACEABLE 1
|
|
|
|
#define B_DO_NOT_REPLACE_SYSCALL 2
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-12-14 20:09:06 +03:00
|
|
|
status_t register_generic_syscall(const char *subsystem, syscall_hook hook,
|
2004-12-14 18:46:53 +03:00
|
|
|
uint32 version, uint32 flags);
|
2004-12-14 20:09:06 +03:00
|
|
|
status_t unregister_generic_syscall(const char *subsystem, uint32 version);
|
2004-12-14 18:46:53 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _KERNEL_GENERIC_SYSCALLS_H */
|