xref: /haiku/src/system/libroot/os/arch/arm64/thread.c (revision 20136c336cb044bc813052eb4c2cdef24392951d)
1 /*
2  * Copyright 2019-2022 Haiku, Inc. All Rights Reserved.
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