summaryrefslogtreecommitdiff
path: root/src/include
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/include
parent66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 (diff)
downloadTCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.tar.gz
TCE-5cac9acd3aedc8043d4272d93c56805c46ff6214.zip
Some cleanup ; relocated the kernel at 0xC0000000
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gc/mem.h9
-rw-r--r--src/include/gc/shm.h16
-rw-r--r--src/include/gc/syscall.h43
-rw-r--r--src/include/mutex.h15
-rw-r--r--src/include/stdlib.h12
-rw-r--r--src/include/string.h18
6 files changed, 0 insertions, 113 deletions
diff --git a/src/include/gc/mem.h b/src/include/gc/mem.h
deleted file mode 100644
index 2557289..0000000
--- a/src/include/gc/mem.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef DEF_HEAP_H
-#define DEF_HEAP_H
-
-#include "gc/syscall.h"
-
-void* malloc(size_t size);
-void free(void* p);
-
-#endif
diff --git a/src/include/gc/shm.h b/src/include/gc/shm.h
deleted file mode 100644
index 1a3f0a1..0000000
--- a/src/include/gc/shm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef DEF_SHM_H
-#define DEF_SHM_H
-
-#include <gc/syscall.h>
-
-/*
- * This file contains headers for the shared segment mapping manager.
- */
-
-void* shm_alloc(size_t size); //allocates a spot in shared memory space
-void shm_free(void* p); //frees a spot
-
-void* shm_allocNew(size_t size); //calls shm_alloc, and maps a new segment there
-void shm_freeDel(void* p); //unmaps segment and calls shm_free
-
-#endif
diff --git a/src/include/gc/syscall.h b/src/include/gc/syscall.h
deleted file mode 100644
index a8928e3..0000000
--- a/src/include/gc/syscall.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef DEF_SYSCALL_H
-#define DEF_SYSCALL_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 size_t;
-
-struct user_request {
- uint32_t func, params[3], shmsize[3];
- int isBlocking; // 1 : blocking request, 0 : nonblocking request (message)
- int pid; //pid of caller process
-};
-
-struct user_sendrequest {
- uint32_t func, a, b, c;
- uint32_t answeri;
- int64_t answerll;
- int errcode;
-};
-
-#define NEW_STACK_SIZE 0x8000
-
-void thread_exit();
-void schedule();
-void thread_sleep(int time);
-void process_exit(int retval);
-void printk(char* str);
-void thread_new(void (*entry)(void*), void *data);
-void irq_wait(int number);
-int proc_priv();
-
-int proc_setheap(size_t start, size_t end);
-int shm_create(size_t offset, size_t length);
-int shm_delete(size_t offset);
-
-#endif
diff --git a/src/include/mutex.h b/src/include/mutex.h
deleted file mode 100644
index 50b5606..0000000
--- a/src/include/mutex.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef DEF_MUTEX_H
-#define DEF_MUTEX_H
-
-#include <gc/syscall.h>
-
-#define MUTEX_LOCKED 1
-#define MUTEX_UNLOCKED 0
-
-//A mutex is just an uint32_t
-
-void mutex_lock(uint32_t* mutex); //wait for mutex to be free
-int mutex_lockE(uint32_t* mutex); //lock mutex only if free, returns !0 if locked, 0 if was busy
-void mutex_unlock(uint32_t* mutex);
-
-#endif
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
deleted file mode 100644
index 3a2b42c..0000000
--- a/src/include/stdlib.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _DEF_STDLIB_H
-#define _DEF_STDLIB_H
-
-#define NULL 0
-
-//includes malloc/free
-#include <gc/mem.h>
-
-void printk_int(int number);
-void printk_hex(unsigned number);
-
-#endif
diff --git a/src/include/string.h b/src/include/string.h
deleted file mode 100644
index 24ac216..0000000
--- a/src/include/string.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _DEF_STRING_H
-#define _DEF_STRING_H
-
-#include <gc/syscall.h>
-#include <stdlib.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);
-char *strcpy(char *dest, const char *src);
-char *strdup(const char *src);
-char *strchr(const char *str, char c);
-char *strcat(char *dest, const char *src);
-int strcmp(const char *s1, const char *s2);
-
-#endif