Changeset d5b37b6 in mainline for uspace/lib/c/generic/io/kio.c


Ignore:
Timestamp:
2025-04-17T15:14:03Z (5 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
690ad20
Parents:
571cc2d
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-11 17:35:09)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 15:14:03)
Message:

Use a new syscall, SYS_KIO_READ, for reading from KIO buffer

Originally, the buffer memory was shared between kernel and
uspace, presumably to avoid the overhead of syscalls.
However, this makes synchronization with kernel impossible,
so it is not possible to ensure it works reliably without
random glitches. Also, relative to everything else /app/kio
does with the data, the syscall overhead is positively tiny.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/kio.c

    r571cc2d rd5b37b6  
    3434 */
    3535
     36#include <abi/syscall.h>
    3637#include <stddef.h>
    3738#include <libc.h>
     
    112113}
    113114
     115size_t kio_read(char32_t *buf, size_t n, size_t at)
     116{
     117        return __SYSCALL3(SYS_KIO_READ, (sysarg_t) buf, n, at);
     118}
     119
    114120/** Print formatted text to kio.
    115121 *
Note: See TracChangeset for help on using the changeset viewer.