libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / system / libroot / os / arch / x86 / thread.c
blobad6dc4d3f7301e224276820acee1ec79ffecfb32
1 /*
2 * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <OS.h>
8 #include "syscalls.h"
11 thread_id
12 find_thread(const char *name)
14 // BeOS R5 applications also use this trick as find_thread was available
15 // in BeOS R5 OS.h as inline function. Do not change storage of thread id.
16 if (!name) {
17 thread_id thread;
18 __asm__ __volatile__ (
19 "movl %%fs:4, %%eax \n\t"
20 : "=a" (thread));
21 return thread;
23 return _kern_find_thread(name);
27 // see OS.h from BeOS R5 for the reason why we need this
28 // there find_thread (see above) is provided as inline function
29 extern thread_id _kfind_thread_(const char *name);
32 thread_id
33 _kfind_thread_(const char *name)
35 return _kern_find_thread(name);
39 extern thread_id _kget_thread_stacks_(thread_id thread, uint32 *stacks);
41 status_t
42 _kget_thread_stacks_(thread_id thread, uint32 *stacks)
44 // This one is obviously called from the R4.5 startup code. I am not
45 // exactly sure how it returns its infos, but just returning an
46 // error seems to work fine as well
47 return B_ERROR;