syscalls: poll

This commit is contained in:
Matheus
2022-10-15 14:06:07 -03:00
parent d66ff03141
commit 82f839f8a7
8 changed files with 197 additions and 7 deletions
+13
View File
@@ -100,6 +100,19 @@ int vfs_isatty(vnode_t* node){
}
int vfs_poll(vnode_t* node, pollfd* fd){
switch(GETTYPE(node->st.st_mode)){
case TYPE_CHARDEV:
case TYPE_BLOCKDEV:
return devman_poll(node->st.st_rdev, fd);
case TYPE_FIFO:
default:
_panic("Unsupported poll", NULL);
}
}
int vfs_ioctl(vnode_t* node, unsigned long request, void* arg, int* result){
if(GETTYPE(node->st.st_mode) != TYPE_CHARDEV)