PatchworkOS
Loading...
Searching...
No Matches
share.c
Go to the documentation of this file.
1
#include <
errno.h
>
2
#include <
sys/io.h
>
3
4
#include "
user/common/syscalls.h
"
5
6
uint64_t
share
(
key_t
* key,
fd_t
fd,
clock_t
timeout)
7
{
8
if
(
_syscall_share
(key, 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(key_t *key, 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
A file descriptor.
Definition
fd_t.h:12
clock_t
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition
clock_t.h:13
io.h
syscalls.h
_syscall_share
static uint64_t _syscall_share(key_t *key, fd_t fd, clock_t timeout)
Definition
syscalls.h:248
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
key_t
Key type.
Definition
io.h:503
src
libstd
user
functions
io
share.c
Generated by
1.9.8