Mercurial > lcfOS
diff cos/kernel/kernel.h @ 24:d8627924d40d
Split up in more files and reboot command
author | windel |
---|---|
date | Fri, 02 Dec 2011 14:00:02 +0100 |
parents | b1fed2171e1a |
children | d3c4bf3720a3 |
line wrap: on
line diff
--- a/cos/kernel/kernel.h Thu Dec 01 21:42:59 2011 +0100 +++ b/cos/kernel/kernel.h Fri Dec 02 14:00:02 2011 +0100 @@ -27,6 +27,7 @@ } __attribute__((packed)) idtPointer; // memory alloc functions: +void init_heap(); void* kmalloc(uint64_t size); void kfree(void* ptr); @@ -34,11 +35,15 @@ void printf(const char* fmt, ... ); void memset(void* ptr, uint32_t value, uint32_t num); void memcpy(void* dst, void* src, uint32_t num); +int strncmp(const char* s1, const char* s2, int size); // Screen related: void clear_screen(); void init_screen(); void print_string(const char *); +void set_cursor(int newrow, int newcol); +void get_cursor(int *therow, int *thecol); +void set_color(int forecolor, int backcolor); // For IO ports: uint8_t inb(uint16_t); @@ -54,6 +59,7 @@ // Panic exit: void halt(void); +void panic(char *msg); // Bochs xchg bx,bx breakpoint: void magicBochsBreak(); @@ -63,7 +69,11 @@ // Keyboard driver: void keyboardDriverUpdate(unsigned char scancode); +void getline(char *buffer, int len); + +// Timer: void timerDriverUpdate(void); +uint64_t getTimeMS(); // Memory functions: void mappage(uint64_t address); @@ -106,7 +116,8 @@ uint32_t type; }; -typedef struct { +typedef struct +{ char name[32]; // Name of the console unsigned char screendata[80*25]; // All chars in the console! } console_t;