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 10extern "C" { 11#endif 12 13 14/* kernel threads */ 15 16extern 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 22extern fssh_status_t fssh_user_memcpy(void *dest, const void *source, 23 fssh_size_t length); 24 25/* primitive kernel debugging facilities */ 26 27extern void fssh_dprintf(const char *format, ...) /* just like printf */ 28 __attribute__ ((format (__printf__, 1, 2))); 29extern void fssh_kprintf(const char *fmt, ...) /* only for debugger cmds */ 30 __attribute__ ((format (__printf__, 1, 2))); 31 32extern void fssh_dump_block(const char *buffer, int size, 33 const char *prefix); 34 35extern void fssh_panic(const char *format, ...) 36 __attribute__ ((format (__printf__, 1, 2))); 37 38extern void fssh_kernel_debugger(const char *message); /* enter kernel debugger */ 39extern uint32_t fssh_parse_expression(const char *string); /* utility for debugger cmds */ 40 41typedef int (*fssh_debugger_command_hook)(int argc, char **argv); 42 43extern int fssh_add_debugger_command(const char *name, 44 fssh_debugger_command_hook hook, const char *help); 45extern 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