xref: /haiku/headers/private/kernel/generic_syscall.h (revision 6b202f4e3da73d4c131355fcd82b792d153f84f6)
1c3c3d22fSAxel Dörfler /*
2c3c3d22fSAxel Dörfler  * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3c3c3d22fSAxel Dörfler  * Distributed under the terms of the MIT License.
4c3c3d22fSAxel Dörfler  */
5c3c3d22fSAxel Dörfler #ifndef _KERNEL_GENERIC_SYSCALLS_H
6c3c3d22fSAxel Dörfler #define _KERNEL_GENERIC_SYSCALLS_H
7c3c3d22fSAxel Dörfler 
8c3c3d22fSAxel Dörfler 
9c3c3d22fSAxel Dörfler #include <SupportDefs.h>
10c3c3d22fSAxel Dörfler 
11*6b202f4eSIngo Weinhold #include <generic_syscall_defs.h>
12*6b202f4eSIngo Weinhold 
13c3c3d22fSAxel Dörfler 
14c3c3d22fSAxel Dörfler /* If we decide to make this API public, the contents of this file
15c3c3d22fSAxel Dörfler  * should be moved to KernelExport.h
16c3c3d22fSAxel Dörfler  */
17c3c3d22fSAxel Dörfler 
18dbef8d93SAxel Dörfler typedef status_t (*syscall_hook)(const char *subsystem, uint32 function, void *buffer, size_t bufferSize);
19c3c3d22fSAxel Dörfler 
20c3c3d22fSAxel Dörfler /* syscall flags */
21c3c3d22fSAxel Dörfler #define B_SYSCALL_NOT_REPLACEABLE	1
22c3c3d22fSAxel Dörfler #define B_DO_NOT_REPLACE_SYSCALL	2
23c3c3d22fSAxel Dörfler 
24c3c3d22fSAxel Dörfler 
25c3c3d22fSAxel Dörfler #ifdef __cplusplus
26c3c3d22fSAxel Dörfler extern "C" {
27c3c3d22fSAxel Dörfler #endif
28c3c3d22fSAxel Dörfler 
29dbef8d93SAxel Dörfler status_t register_generic_syscall(const char *subsystem, syscall_hook hook,
30c3c3d22fSAxel Dörfler 			uint32 version, uint32 flags);
31dbef8d93SAxel Dörfler status_t unregister_generic_syscall(const char *subsystem, uint32 version);
32c3c3d22fSAxel Dörfler 
33c3c3d22fSAxel Dörfler #ifdef __cplusplus
34c3c3d22fSAxel Dörfler }
35c3c3d22fSAxel Dörfler #endif
36c3c3d22fSAxel Dörfler 
37c3c3d22fSAxel Dörfler #endif	/* _KERNEL_GENERIC_SYSCALLS_H */
38