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 89523f22bf
commit 4cd47453ae
2 changed files with 8 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
2019-12-04 NIIBE Yutaka <gniibe@fsij.org>
* chopstx-gnu-linux.c (chx_thread_start): Fix return value.
2019-11-21 NIIBE Yutaka <gniibe@fsij.org>
* chopstx-cortex-m.c (chx_set_running): New.

View File

@@ -328,9 +328,11 @@ chx_sched (uint32_t yield)
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 *