mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
keyboard: poll
This commit is contained in:
+10
-1
@@ -145,8 +145,17 @@ static int read(int *error, int minor, void* buff, size_t count, size_t offset){
|
||||
|
||||
}
|
||||
|
||||
static int poll(pollfd* fd){
|
||||
|
||||
if((fd->events & POLLIN) && devbuff.read != devbuff.write)
|
||||
fd->revents |= POLLIN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static devcalls calls = {
|
||||
read
|
||||
.read = read,
|
||||
.poll = poll
|
||||
};
|
||||
|
||||
void keyboard_init(){
|
||||
|
||||
Reference in New Issue
Block a user