shithub: riscv

ref: e51c4bc6e493a9cd0d9e9d7f1d24c57ae77bab65
dir: /sys/src/libthread/ioopen.c/

View raw version
#include <u.h>
#include <libc.h>
#include <thread.h>
#include "threadimpl.h"

static long
_ioopen(va_list *arg)
{
	char *path;
	int mode;

	path = va_arg(*arg, char*);
	mode = va_arg(*arg, int);
	return open(path, mode);
}

int
ioopen(Ioproc *io, char *path, int mode)
{
	return iocall(io, _ioopen, path, mode);
}