xref: /haiku/headers/private/fs_shell/fssh_kernel_export.h (revision 21885de266a154a66d4027ba78b8c9ed8f12ac3b)
1a38a92c9SIngo Weinhold #ifndef _FSSH_KERNEL_EXPORT_H
2a38a92c9SIngo Weinhold #define _FSSH_KERNEL_EXPORT_H
3a38a92c9SIngo Weinhold 
4a38a92c9SIngo Weinhold 
5a38a92c9SIngo Weinhold #include "fssh_defs.h"
6a38a92c9SIngo Weinhold #include "fssh_os.h"
7a38a92c9SIngo Weinhold 
8a38a92c9SIngo Weinhold 
9a38a92c9SIngo Weinhold #ifdef __cplusplus
10a38a92c9SIngo Weinhold extern "C" {
11a38a92c9SIngo Weinhold #endif
12a38a92c9SIngo Weinhold 
13*21885de2SAxel Dörfler 
14a38a92c9SIngo Weinhold /* kernel threads */
15a38a92c9SIngo Weinhold 
16a38a92c9SIngo Weinhold extern fssh_thread_id	fssh_spawn_kernel_thread(fssh_thread_func function,
17a38a92c9SIngo Weinhold 								const char *threadName,  int32_t priority,
18a38a92c9SIngo Weinhold 								void *arg);
19a38a92c9SIngo Weinhold 
20*21885de2SAxel Dörfler /* misc */
21a38a92c9SIngo Weinhold 
22*21885de2SAxel Dörfler extern fssh_status_t	fssh_user_memcpy(void *dest, const void *source,
23*21885de2SAxel Dörfler 								fssh_size_t length);
24*21885de2SAxel Dörfler 
25a38a92c9SIngo Weinhold /* primitive kernel debugging facilities */
26a38a92c9SIngo Weinhold 
27a38a92c9SIngo Weinhold extern void			fssh_dprintf(const char *format, ...)	/* just like printf */
28a38a92c9SIngo Weinhold 							__attribute__ ((format (__printf__, 1, 2)));
29a38a92c9SIngo Weinhold extern void			fssh_kprintf(const char *fmt, ...)			/* only for debugger cmds */
30a38a92c9SIngo Weinhold 							__attribute__ ((format (__printf__, 1, 2)));
31a38a92c9SIngo Weinhold 
32a38a92c9SIngo Weinhold extern void 		fssh_dump_block(const char *buffer, int size,
33a38a92c9SIngo Weinhold 							const char *prefix);
34a38a92c9SIngo Weinhold 
35a38a92c9SIngo Weinhold extern void			fssh_panic(const char *format, ...)
36a38a92c9SIngo Weinhold 							__attribute__ ((format (__printf__, 1, 2)));
37a38a92c9SIngo Weinhold 
38a38a92c9SIngo Weinhold extern void			fssh_kernel_debugger(const char *message);	/* enter kernel debugger */
39a38a92c9SIngo Weinhold extern uint32_t		fssh_parse_expression(const char *string);	/* utility for debugger cmds */
40a38a92c9SIngo Weinhold 
41a38a92c9SIngo Weinhold typedef int (*fssh_debugger_command_hook)(int argc, char **argv);
42a38a92c9SIngo Weinhold 
43a38a92c9SIngo Weinhold extern int			fssh_add_debugger_command(char *name,
44a38a92c9SIngo Weinhold 							fssh_debugger_command_hook hook, char *help);
45a38a92c9SIngo Weinhold extern int			fssh_remove_debugger_command(char *name,
46a38a92c9SIngo Weinhold 							fssh_debugger_command_hook hook);
47a38a92c9SIngo Weinhold 
48a38a92c9SIngo Weinhold 
49a38a92c9SIngo Weinhold #ifdef __cplusplus
50a38a92c9SIngo Weinhold }
51a38a92c9SIngo Weinhold #endif
52a38a92c9SIngo Weinhold 
53a38a92c9SIngo Weinhold 
54a38a92c9SIngo Weinhold #endif	// _FSSH_KERNEL_EXPORT_H
55