diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-02-18 23:37:09 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-20 00:32:35 +0100 |
commit | e48f33e76be2a3baa920b7e9f472354f7ff0c0a6 (patch) | |
tree | 91f9a53fb29a3074d77dc511af46290d94b007cc /mach | |
parent | a307e1b31551821946b242ca98f5db9e7d9f558a (diff) | |
download | glibc-e48f33e76be2a3baa920b7e9f472354f7ff0c0a6.tar.gz glibc-e48f33e76be2a3baa920b7e9f472354f7ff0c0a6.tar.xz glibc-e48f33e76be2a3baa920b7e9f472354f7ff0c0a6.zip |
hurd: Move thread state manipulation into _hurd_tls_new ()
This is going to be done differently on x86_64. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-Id: <20230218203717.373211-2-bugaevc@gmail.com>
Diffstat (limited to 'mach')
-rw-r--r-- | mach/setup-thread.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/mach/setup-thread.c b/mach/setup-thread.c index 6ce5c13d37..ae24a14955 100644 --- a/mach/setup-thread.c +++ b/mach/setup-thread.c @@ -83,25 +83,11 @@ weak_alias (__mach_setup_thread, mach_setup_thread) kern_return_t __mach_setup_tls (thread_t thread) { - kern_return_t error; - struct machine_thread_state ts; - mach_msg_type_number_t tssize = MACHINE_THREAD_STATE_COUNT; - tcbhead_t *tcb; - - tcb = _dl_allocate_tls (NULL); + tcbhead_t *tcb = _dl_allocate_tls (NULL); if (tcb == NULL) return KERN_RESOURCE_SHORTAGE; - if (error = __thread_get_state (thread, MACHINE_THREAD_STATE_FLAVOR, - (natural_t *) &ts, &tssize)) - return error; - assert (tssize == MACHINE_THREAD_STATE_COUNT); - - _hurd_tls_new (thread, &ts, tcb); - - error = __thread_set_state (thread, MACHINE_THREAD_STATE_FLAVOR, - (natural_t *) &ts, tssize); - return error; + return _hurd_tls_new (thread, tcb); } weak_alias (__mach_setup_tls, mach_setup_tls) |