662 event_send(aiocb->evhandler, aiocb->event); |
662 event_send(aiocb->evhandler, aiocb->event); |
663 return NULL; |
663 return NULL; |
664 } |
664 } |
665 |
665 |
666 void vfs_queue_aio(aiocb_s *aiocb, VFSAioOp op) { |
666 void vfs_queue_aio(aiocb_s *aiocb, VFSAioOp op) { |
667 threadpool_t *pool = get_default_threadpool(); // TODO: use IOPool |
667 threadpool_t *pool = get_default_iopool(); // TODO: use specific IOPool |
668 if(op == VFS_AIO_READ) { |
668 if(op == VFS_AIO_READ) { |
669 threadpool_run(pool, (job_callback_f)vfs_aio_read, aiocb); |
669 threadpool_run(pool, (job_callback_f)vfs_aio_read, aiocb); |
670 } else if(VFS_AIO_WRITE) { |
670 } else if(VFS_AIO_WRITE) { |
671 threadpool_run(pool, (job_callback_f)vfs_aio_write, aiocb); |
671 threadpool_run(pool, (job_callback_f)vfs_aio_write, aiocb); |
672 } |
672 } |