1 /* 2 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "fssh_kernel_export.h" 7 8 #include <stdarg.h> 9 #include <stdio.h> 10 #include <stdlib.h> 11 12 #include "fssh_errors.h" 13 14 15 fssh_thread_id 16 fssh_spawn_kernel_thread(fssh_thread_func function, const char *threadName, 17 int32_t priority, void *arg) 18 { 19 return FSSH_B_ERROR; 20 } 21 22 23 void 24 fssh_dprintf(const char *format, ...) 25 { 26 va_list args; 27 va_start(args, format); 28 29 vprintf(format, args); 30 31 va_end(args); 32 } 33 34 35 void 36 fssh_kprintf(const char *format, ...) 37 { 38 va_list args; 39 va_start(args, format); 40 41 vprintf(format, args); 42 43 va_end(args); 44 } 45 46 47 void 48 fssh_dump_block(const char *buffer, int size, const char *prefix) 49 { 50 } 51 52 53 void 54 fssh_panic(const char *format, ...) 55 { 56 va_list args; 57 va_start(args, format); 58 59 vfprintf(stderr, format, args); 60 61 va_end(args); 62 63 // exit(1); 64 int* badAddress = 0; 65 *badAddress = 42; 66 } 67 68 void 69 fssh_kernel_debugger(const char *message) 70 { 71 fssh_panic("%s", message); 72 } 73 74 75 uint32_t 76 fssh_parse_expression(const char *string) 77 { 78 return 0; 79 } 80 81 int 82 fssh_add_debugger_command(char *name, fssh_debugger_command_hook hook, 83 char *help) 84 { 85 return 0; 86 } 87 88 89 int 90 fssh_remove_debugger_command(char *name, fssh_debugger_command_hook hook) 91 { 92 return 0; 93 } 94 95