PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
share.c
Go to the documentation of this file.
1#include <errno.h>
2#include <sys/fs.h>
3
5
6uint64_t share(char* key, uint64_t size, fd_t fd, clock_t timeout)
7{
8 if (_syscall_share(key, size, fd, timeout) == ERR)
9 {
11 return ERR;
12 }
13 return 0;
14}
#define errno
Error number variable.
Definition errno.h:27
uint64_t share(char *key, uint64_t size, fd_t fd, clock_t timeout)
System call for sharing a file descriptor with another process.
Definition share.c:6
#define ERR
Integer error value.
Definition ERR.h:17
__UINT64_TYPE__ fd_t
File descriptor type.
Definition fd_t.h:10
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition clock_t.h:13
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
static uint64_t _syscall_share(char *key, uint64_t size, fd_t fd, clock_t timeout)
Definition syscalls.h:232
static errno_t _syscall_errno(void)
Definition syscalls.h:107