mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-05 12:56:08 +00:00
Implement _get_curthread and _set_curthread. We use GCCs builtin
function this, which expands to PAL calls (rduniq and wruniq). This needs adjustment when TLS is implemented.
This commit is contained in:
parent
e180afe760
commit
c24297c0f2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117959
@ -35,13 +35,18 @@ __FBSDID("$FreeBSD$");
|
||||
void *
|
||||
_set_curthread(ucontext_t *uc, struct pthread *thread, int *err)
|
||||
{
|
||||
*err = 0;
|
||||
if (uc != NULL)
|
||||
uc->uc_mcontext.mc_thrptr = (uint64_t)thread;
|
||||
else
|
||||
__builtin_set_thread_pointer(thread);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
struct pthread *
|
||||
_get_curthread(void)
|
||||
{
|
||||
return (NULL);
|
||||
return (__builtin_thread_pointer());
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user