PatchworkOS
Loading...
Searching...
No Matches
claim.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
fd_t
claim
(
key_t
* key)
7
{
8
fd_t
fd =
_syscall_claim
(key);
9
if
(fd ==
ERR
)
10
{
11
errno
=
_syscall_errno
();
12
return
ERR
;
13
}
14
return
fd;
15
}
errno.h
errno
#define errno
Error number variable.
Definition
errno.h:27
claim
fd_t claim(key_t *key)
System call for claiming a shared file descriptor.
Definition
claim.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
io.h
syscalls.h
_syscall_claim
static fd_t _syscall_claim(key_t *key)
Definition
syscalls.h:253
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
key_t
Key type.
Definition
io.h:503
src
libstd
user
functions
io
claim.c
Generated by
1.9.8