Store devices as a hashtable
This commit is contained in:
18
kernel/dev/dev.c
Normal file
18
kernel/dev/dev.c
Normal file
@ -0,0 +1,18 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "spinlock/spinlock.h"
|
||||
#include "dev.h"
|
||||
#include "hshtb.h"
|
||||
#include "hal/hal.h"
|
||||
#include "termdev.h"
|
||||
#include "ps2kbdev.h"
|
||||
|
||||
DevTable DEVTABLE;
|
||||
|
||||
void dev_init(void) {
|
||||
hal_memset(&DEVTABLE, 0, sizeof(DEVTABLE));
|
||||
spinlock_init(&DEVTABLE.spinlock);
|
||||
|
||||
termdev_init();
|
||||
ps2kbdev_init();
|
||||
}
|
Reference in New Issue
Block a user