int kio_write(const void *buf, size_t size, size_t *nwritten) { int rc = (int) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) buf, size); if (rc == EOK) *nwritten = size; return rc; }
size_t klog_write(const void *buf, size_t size) { ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size); if (ret >= 0) return (size_t) ret; return 0; }
void kio_command(const void *buf, size_t size) { (void) __SYSCALL3(SYS_KIO, KIO_COMMAND, (sysarg_t) buf, (sysarg_t) size); }
void kio_update(void) { (void) __SYSCALL3(SYS_KIO, KIO_UPDATE, (uintptr_t) NULL, 0); }
void klog_update(void) { (void) __SYSCALL3(SYS_KLOG, 1, (uintptr_t) NULL, 0); }
int dmamem_unmap(void *virt, size_t size) { return __SYSCALL3(SYS_DMAMEM_UNMAP, (sysarg_t) virt, (sysarg_t) size, 0); }
int dmamem_unmap_anonymous(void *virt) { return __SYSCALL3(SYS_DMAMEM_UNMAP, (sysarg_t) virt, 0, DMAMEM_FLAGS_ANONYMOUS); }