PatchworkOS
Loading...
Searching...
No Matches
gettid.c
Go to the documentation of this file.
1
#include <
stdio.h
>
2
#include <
sys/io.h
>
3
4
#include "
user/common/syscalls.h
"
5
6
tid_t
gettid
(
void
)
7
{
8
tid_t
result =
_syscall_gettid
();
9
if
(result ==
ERR
)
10
{
11
errno
=
_syscall_errno
();
12
}
13
return
result;
14
}
errno
#define errno
Error number variable.
Definition
errno.h:27
gettid
tid_t gettid(void)
System call to retrieve the current tid.
Definition
gettid.c:6
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
tid_t
__UINT64_TYPE__ tid_t
Thread Identifier.
Definition
tid_t.h:12
io.h
syscalls.h
_syscall_gettid
static tid_t _syscall_gettid(void)
Definition
syscalls.h:128
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
stdio.h
src
libstd
user
functions
proc
gettid.c
Generated by
1.9.8