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