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