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 #include <string.h> 12 13 #include "fssh_errors.h" 14 15 16 fssh_thread_id 17 fssh_spawn_kernel_thread(fssh_thread_func function, const char *threadName, 18 int32_t priority, void *arg) 19 { 20 return FSSH_B_ERROR; 21 } 22 23 24 fssh_status_t 25 fssh_user_memcpy(void *dest, const void *source, fssh_size_t length) 26 { 27 memcpy(dest, source, length); 28 return FSSH_B_OK; 29 } 30 31 32 void 33 fssh_dprintf(const char *format, ...) 34 { 35 va_list args; 36 va_start(args, format); 37 38 vprintf(format, args); 39 40 va_end(args); 41 } 42 43 44 void 45 fssh_kprintf(const char *format, ...) 46 { 47 va_list args; 48 va_start(args, format); 49 50 vprintf(format, args); 51 52 va_end(args); 53 } 54 55 56 void 57 fssh_dump_block(const char *buffer, int size, const char *prefix) 58 { 59 } 60 61 62 void 63 fssh_panic(const char *format, ...) 64 { 65 va_list args; 66 va_start(args, format); 67 68 vfprintf(stderr, format, args); 69 70 va_end(args); 71 72 // exit(1); 73 int* badAddress = 0; 74 *badAddress = 42; 75 } 76 77 78 void 79 fssh_kernel_debugger(const char *message) 80 { 81 fssh_panic("%s", message); 82 } 83 84 85 uint32_t 86 fssh_parse_expression(const char *string) 87 { 88 return 0; 89 } 90 91 92 int 93 fssh_add_debugger_command(char *name, fssh_debugger_command_hook hook, 94 char *help) 95 { 96 return 0; 97 } 98 99 100 int 101 fssh_remove_debugger_command(char *name, fssh_debugger_command_hook hook) 102 { 103 return 0; 104 } 105 106