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