summaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-01 12:20:45 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-01 12:20:45 +0200
commit5cac9acd3aedc8043d4272d93c56805c46ff6214 (patch)
treeba9eb5ef86f7cf7afd4f7ab02de1d6bb86715632 /src/kernel/lib
parent66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 (diff)
downloadTCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.tar.gz
TCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.zip
Some cleanup ; relocated the kernel at 0xC0000000
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/stdlib.c39
-rw-r--r--src/kernel/lib/stdlib.h15
-rw-r--r--src/kernel/lib/types.h15
3 files changed, 0 insertions, 69 deletions
diff --git a/src/kernel/lib/stdlib.c b/src/kernel/lib/stdlib.c
deleted file mode 100644
index c5245e7..0000000
--- a/src/kernel/lib/stdlib.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "stdlib.h"
-
-void *memcpy(void *vd, const void *vs, int count) {
- uint8_t *dest = (uint8_t*)vd, *src = (uint8_t*)vs;
- uint32_t f = count % 4, n = count / 4, i;
- const uint32_t* s = (uint32_t*)src;
- uint32_t* d = (uint32_t*)dest;
- for (i = 0; i < n; i++) {
- d[i] = s[i];
- }
- if (f != 0) {
- for (i = count - f; i < count; i++) {
- dest[i] = src[i];
- }
- }
- return vd;
-}
-
-uint8_t *memset(uint8_t *dest, uint8_t val, int count) {
- int i;
- for (i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-uint16_t *memsetw(uint16_t *dest, uint16_t val, int count) {
- int i;
- for (i = 0; i < count; i++) {
- dest[i] = val;
- }
- return dest;
-}
-
-int strlen(const char *str) {
- int i = 0;
- while (str[i++]);
- return i;
-}
diff --git a/src/kernel/lib/stdlib.h b/src/kernel/lib/stdlib.h
deleted file mode 100644
index 319cf26..0000000
--- a/src/kernel/lib/stdlib.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef DEF_STDLIB_H
-#define DEF_STDLIB_H
-
-#include <types.h>
-
-void *memcpy(void *dest, const void *src, int count);
-uint8_t *memset(uint8_t *dest, uint8_t val, int count);
-uint16_t *memsetw(uint16_t *dest, uint16_t val, int count);
-int strlen(const char *str);
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-#endif
-
diff --git a/src/kernel/lib/types.h b/src/kernel/lib/types.h
deleted file mode 100644
index b7b19ab..0000000
--- a/src/kernel/lib/types.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef DEF_TYPES_H
-#define DEF_TYPES_H
-
-typedef unsigned long long uint64_t;
-typedef unsigned int uint32_t;
-typedef unsigned short uint16_t;
-typedef unsigned char uint8_t;
-typedef long long int64_t;
-typedef int int32_t;
-typedef short int16_t;
-typedef char int8_t;
-
-typedef unsigned int size_t;
-
-#endif