1/*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef THREAD_H
6#define THREAD_H
7
8#include <OS.h>
9
10
11namespace BKernel {
12	struct Thread;
13}
14
15using BKernel::Thread;
16
17
18static inline Thread*
19get_current_thread()
20{
21	return (Thread*)(addr_t)find_thread(NULL);
22}
23
24
25static inline thread_id
26get_thread_id(Thread* thread)
27{
28	return (thread_id)(addr_t)thread;
29}
30
31
32#endif	// THREAD_H
33