PatchworkOS
Loading...
Searching...
No Matches
thrd_current.c
Go to the documentation of this file.
1
#include <
stdatomic.h
>
2
#include <
stdbool.h
>
3
#include <
stdio.h
>
4
#include <
sys/proc.h
>
5
#include <
threads.h
>
6
7
#include "
user/common/syscalls.h
"
8
#include "
user/common/thread.h
"
9
10
thrd_t
thrd_current
(
void
)
11
{
12
thrd_t
thr = (
thrd_t
){.
id
=
gettid
()};
13
return
thr;
14
}
gettid
tid_t gettid(void)
System call to retrieve the current tid.
Definition
gettid.c:6
proc.h
syscalls.h
thread.h
stdatomic.h
stdbool.h
stdio.h
thrd_t
Definition
threads.h:37
thrd_t::id
tid_t id
Definition
threads.h:38
thrd_current
thrd_t thrd_current(void)
Definition
thrd_current.c:10
threads.h
src
libstd
user
functions
thread
thrd_current.c
Generated by
1.9.8