2 * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
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.
18 __asm__
__volatile__ (
19 "movl %%fs:4, %%eax \n\t"
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
);
33 _kfind_thread_(const char *name
)
35 return _kern_find_thread(name
);
39 extern thread_id
_kget_thread_stacks_(thread_id thread
, uint32
*stacks
);
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