xref: /haiku/src/system/libroot/os/arch/riscv64/thread.cpp (revision 13581b3d2a71545960b98fefebc5225b5bf29072)
1 /*
2  * Copyright 2021, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <OS.h>
8 #include "syscalls.h"
9 #include <tls.h>
10 
11 
12 thread_id
13 find_thread(const char *name)
14 {
15 	if (name == NULL)
16 		return (thread_id)(addr_t)tls_get(TLS_THREAD_ID_SLOT);
17 
18 	return _kern_find_thread(name);
19 }
20