root/src/system/libroot/os/arch/arm64/thread.c
/*
 * Copyright 2019-2022 Haiku, Inc. All Rights Reserved.
 * Distributed under the terms of the MIT License.
 */


#include <OS.h>
#include "syscalls.h"
#include <tls.h>


thread_id
find_thread(const char *name)
{
        if (name == NULL)
                return (thread_id)(addr_t)tls_get(TLS_THREAD_ID_SLOT);

        return _kern_find_thread(name);
}