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