PatchworkOS
Loading...
Searching...
No Matches
open2.c
Go to the documentation of this file.
1#include <stdarg.h>
2#include <stdio.h>
3#include <stdlib.h>
4#include <sys/io.h>
5
6#include "common/print.h"
8
9uint64_t open2(const char* path, fd_t fds[2])
10{
11 uint64_t result = _syscall_open2(path, fds);
12 if (result == ERR)
13 {
15 }
16 return result;
17}
#define errno
Error number variable.
Definition errno.h:27
uint64_t open2(const char *path, fd_t fds[2])
System call for opening 2 file descriptors from one file.
Definition open2.c:9
#define ERR
Integer error value.
Definition ERR.h:17
__UINT64_TYPE__ fd_t
A file descriptor.
Definition fd_t.h:12
static uint64_t _syscall_open2(const char *path, fd_t fds[2])
Definition syscalls.h:148
static errno_t _syscall_errno(void)
Definition syscalls.h:118
__UINT64_TYPE__ uint64_t
Definition stdint.h:17