Mercurial > lcfOS
diff cos/kernel/kernel.h @ 34:8012221dd740
Fixes for uninitialized data. This causes problems on real machines
author | windel |
---|---|
date | Mon, 16 Jan 2012 13:46:06 +0100 |
parents | 3a6a9b929db0 |
children | 5c20bd53cccd |
line wrap: on
line diff
--- a/cos/kernel/kernel.h Sun Jan 15 13:39:49 2012 +0100 +++ b/cos/kernel/kernel.h Mon Jan 16 13:46:06 2012 +0100 @@ -11,6 +11,13 @@ typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long int uint64_t; +typedef long int int64_t; + +_Static_assert(sizeof(uint8_t) == 1, "sizeof(uint8_t) != 1"); +_Static_assert(sizeof(uint16_t) == 2, "sizeof(uint16_t) != 2"); +_Static_assert(sizeof(uint32_t) == 4, "sizeof(uint32_t) != 4"); +_Static_assert(sizeof(uint64_t) == 8, "sizeof(uint64_t) != 8"); +_Static_assert(sizeof(int64_t) == 8, "sizeof(int64_t) != 8"); // IDT related structures: typedef struct { @@ -315,10 +322,12 @@ // Keyboard driver: void keyboardDriverUpdate(void); void getline(char *buffer, int len); +void keyboard_init(void); // Timer: void timerDriverUpdate(void); uint64_t getTimeMS(); +void timer_init(void); #endif