aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
authorMarvin Borner2019-10-12 23:28:01 +0200
committerMarvin Borner2019-10-12 23:31:27 +0200
commit876df2125f4f24803d5471894e5308e7425ebfd2 (patch)
treea91b066e93c6694c41384ae8f2e296167715768c /src/kernel/lib
parentb2f80382659e739d5e37eefff1ebcdfd023bb9fb (diff)
Paging and heap rewrite
VESA drawing causes a Page fault because it tries to use a pointer to the framebuffer which was created before the paging has been initialized. If the resolution is set after the paging has been initialized the CPU throws a triple fault because the int32 call can not happen with paging turned on. To be fixed soon!
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/lib.h8
-rw-r--r--src/kernel/lib/string.c17
2 files changed, 0 insertions, 25 deletions
diff --git a/src/kernel/lib/lib.h b/src/kernel/lib/lib.h
index 0292cc3..03b4a3e 100644
--- a/src/kernel/lib/lib.h
+++ b/src/kernel/lib/lib.h
@@ -61,12 +61,4 @@ void *memory_set(void *dest, char val, size_t count);
*/
int memory_compare(const void *a_ptr, const void *b_ptr, size_t size);
-/**
- * Convert an int into a string
- * @param i The integer which should be converted
- * @param b The converted int as string
- * @param base The desired base
- */
-void *itoa(int i, char *b, int base);
-
#endif
diff --git a/src/kernel/lib/string.c b/src/kernel/lib/string.c
index ef746d6..1e41d15 100644
--- a/src/kernel/lib/string.c
+++ b/src/kernel/lib/string.c
@@ -34,20 +34,3 @@ char *strcpy(char *dest, const char *src) {
dest[i] = 0;
return dest;
}
-
-void *itoa(int i, char *b, int base) {
- int temp_i;
- temp_i = i;
- int stringLen = 1;
-
- while ((int) temp_i / base != 0) {
- temp_i = (int) temp_i / base;
- stringLen++;
- }
-
- temp_i = i;
- do {
- *(b + stringLen - 1) = (temp_i % base) + '0';
- temp_i = (int) temp_i / base;
- } while (stringLen--);
-} \ No newline at end of file