Fix GNU/Linux emulation about termination of a thread.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2019-12-04 13:44:57 +09:00
parent 6ce92cc0e8
commit 746388331c
3 changed files with 13 additions and 2 deletions

View File

@@ -277,9 +277,11 @@ voluntary_context_switch (struct chx_thread *tp_next)
static void __attribute__((__noreturn__))
chx_thread_start (voidfunc thread_entry, void *arg)
{
void *ret;
chx_cpu_sched_unlock ();
thread_entry (arg);
chopstx_exit (0);
ret = thread_entry (arg);
chopstx_exit (ret);
}
static struct chx_thread *