Bare metal VGA: clarify code comments (#616)

This commit is contained in:
tkchia 2022-09-14 06:26:33 +08:00 committed by GitHub
parent aab4ee4072
commit 945699694e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View file

@ -30,7 +30,15 @@
#include "libc/vga/vga.internal.h"
ssize_t sys_readv_vga(struct Fd *fd, const struct iovec *iov, int iovlen) {
/* NOTE: this routine is always non-blocking. */
/*
* NOTE: this routine is always non-blocking.
*
* sys_readv_metal() calls here to ask if the VGA teletypewriter has any
* "status reports" escape sequences to send out.
*
* If there are no such status reports, then immediately return 0.
* sysv_readv_metal() will then try to read from an actual input device.
*/
size_t i, redd = 0;
ssize_t res = 0;
for (i = 0; i < iovlen; ++i) {