comparison 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
comparison
equal deleted inserted replaced
33:d8185ddb6c7b 34:8012221dd740
9 // Type defs: 9 // Type defs:
10 typedef unsigned char uint8_t; 10 typedef unsigned char uint8_t;
11 typedef unsigned short uint16_t; 11 typedef unsigned short uint16_t;
12 typedef unsigned int uint32_t; 12 typedef unsigned int uint32_t;
13 typedef unsigned long int uint64_t; 13 typedef unsigned long int uint64_t;
14 typedef long int int64_t;
15
16 _Static_assert(sizeof(uint8_t) == 1, "sizeof(uint8_t) != 1");
17 _Static_assert(sizeof(uint16_t) == 2, "sizeof(uint16_t) != 2");
18 _Static_assert(sizeof(uint32_t) == 4, "sizeof(uint32_t) != 4");
19 _Static_assert(sizeof(uint64_t) == 8, "sizeof(uint64_t) != 8");
20 _Static_assert(sizeof(int64_t) == 8, "sizeof(int64_t) != 8");
14 21
15 // IDT related structures: 22 // IDT related structures:
16 typedef struct { 23 typedef struct {
17 uint16_t baseLow; 24 uint16_t baseLow;
18 uint16_t selector; 25 uint16_t selector;
313 void doCPUID(int eax, int *ebx, int *ecx, int *edx); 320 void doCPUID(int eax, int *ebx, int *ecx, int *edx);
314 321
315 // Keyboard driver: 322 // Keyboard driver:
316 void keyboardDriverUpdate(void); 323 void keyboardDriverUpdate(void);
317 void getline(char *buffer, int len); 324 void getline(char *buffer, int len);
325 void keyboard_init(void);
318 326
319 // Timer: 327 // Timer:
320 void timerDriverUpdate(void); 328 void timerDriverUpdate(void);
321 uint64_t getTimeMS(); 329 uint64_t getTimeMS();
330 void timer_init(void);
322 331
323 #endif 332 #endif
324 333