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
9
11{
12 thrd_t thr = (thrd_t){.id = gettid()};
13 return thr;
14}
tid_t gettid(void)
System call to retrieve the current tid.
Definition gettid.c:6
tid_t id
Definition threads.h:38
thrd_t thrd_current(void)