PatchworkOS
19e446b
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
share.c
Go to the documentation of this file.
1
#include <
errno.h
>
2
#include <
sys/fs.h
>
3
4
#include "
user/common/syscalls.h
"
5
6
uint64_t
share
(
char
* key,
uint64_t
size,
fd_t
fd,
clock_t
timeout)
7
{
8
if
(
_syscall_share
(key, size, fd, timeout) ==
ERR
)
9
{
10
errno
=
_syscall_errno
();
11
return
ERR
;
12
}
13
return
0;
14
}
errno.h
errno
#define errno
Error number variable.
Definition
errno.h:27
share
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
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
fd_t
__UINT64_TYPE__ fd_t
File descriptor type.
Definition
fd_t.h:10
clock_t
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition
clock_t.h:13
fs.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
syscalls.h
_syscall_share
static uint64_t _syscall_share(char *key, uint64_t size, fd_t fd, clock_t timeout)
Definition
syscalls.h:232
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:107
src
libstd
user
functions
fs
share.c
Generated on Sat Jan 24 2026 10:59:25 for PatchworkOS by
1.9.8