1/*
2 * Copyright 2012-2014, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Jerome Duval <jerome.duval@free.fr>
7 *		Alexander von Gluck IV <kallisti5@unixzen.com>
8 */
9
10
11#include <OS.h>
12
13#include <arch_atomic.h>
14#include "syscalls.h"
15#include <tls.h>
16
17
18thread_id
19find_thread(const char *name)
20{
21	if (name == NULL)
22		return (thread_id)(addr_t)tls_get(TLS_THREAD_ID_SLOT);
23
24	return _kern_find_thread(name);
25}
26
27
28#if !defined(__clang__)
29/*
30 * Fill out gcc __sync_synchronize built-in for ARM
31 */
32void
33__sync_synchronize(void)
34{
35	dmb();
36}
37#endif
38