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 21 /*-------------------------------------------------------------*/ 22 /* primitive kernel debugging facilities */ 23 24 extern void fssh_dprintf(const char *format, ...) /* just like printf */ 25 __attribute__ ((format (__printf__, 1, 2))); 26 extern void fssh_kprintf(const char *fmt, ...) /* only for debugger cmds */ 27 __attribute__ ((format (__printf__, 1, 2))); 28 29 extern void fssh_dump_block(const char *buffer, int size, 30 const char *prefix); 31 32 extern void fssh_panic(const char *format, ...) 33 __attribute__ ((format (__printf__, 1, 2))); 34 35 extern void fssh_kernel_debugger(const char *message); /* enter kernel debugger */ 36 extern uint32_t fssh_parse_expression(const char *string); /* utility for debugger cmds */ 37 38 typedef int (*fssh_debugger_command_hook)(int argc, char **argv); 39 40 extern int fssh_add_debugger_command(char *name, 41 fssh_debugger_command_hook hook, char *help); 42 extern int fssh_remove_debugger_command(char *name, 43 fssh_debugger_command_hook hook); 44 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 51 #endif // _FSSH_KERNEL_EXPORT_H 52