dbef8d930c
modules to use their module name directly. Also introduced a whole range of reserved syscall functions in case we want to add some more. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10458 a95241bf-73f2-0310-859d-f6bbb57e9c96
41 lines
1.0 KiB
C
41 lines
1.0 KiB
C
/*
|
|
* 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>
|
|
|
|
|
|
/* If we decide to make this API public, the contents of this file
|
|
* should be moved to KernelExport.h
|
|
*/
|
|
|
|
typedef status_t (*syscall_hook)(const char *subsystem, uint32 function, void *buffer, size_t bufferSize);
|
|
|
|
/* predefined functions */
|
|
#define B_RESERVED_SYSCALL_BASE 0x80000000
|
|
#define B_SYSCALL_INFO (B_RESERVED_SYSCALL_BASE)
|
|
// gets a minimum version uint32, and fills it with the current version on return
|
|
|
|
/* syscall flags */
|
|
#define B_SYSCALL_NOT_REPLACEABLE 1
|
|
#define B_DO_NOT_REPLACE_SYSCALL 2
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
status_t register_generic_syscall(const char *subsystem, syscall_hook hook,
|
|
uint32 version, uint32 flags);
|
|
status_t unregister_generic_syscall(const char *subsystem, uint32 version);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _KERNEL_GENERIC_SYSCALLS_H */
|