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

@@ -1,3 +1,7 @@
2019-12-04 NIIBE Yutaka <gniibe@fsij.org>
* chopstx-gnu-linux.c (chx_thread_start): Fix return value.
2019-12-03 NIIBE Yutaka <gniibe@fsij.org> 2019-12-03 NIIBE Yutaka <gniibe@fsij.org>
* rules.mk [ARCH=riscv32] (MCFLAGS, LDFLAGS): Define. * rules.mk [ARCH=riscv32] (MCFLAGS, LDFLAGS): Define.

5
NEWS
View File

@@ -3,6 +3,8 @@ NEWS - Noteworthy changes
* Major changes in Chopstx 2.0 * Major changes in Chopstx 2.0
Released 20??-??-??
** Remove support of CHOPSTX_PRIO_INHIBIT_PREEMPTION ** Remove support of CHOPSTX_PRIO_INHIBIT_PREEMPTION
We used to have (an experimental) feature of higher priority of thread We used to have (an experimental) feature of higher priority of thread
(>= CHOPSTX_PRIO_INHIBIT_PREEMPTION). The feature offered: When a (>= CHOPSTX_PRIO_INHIBIT_PREEMPTION). The feature offered: When a
@@ -17,6 +19,9 @@ to support a thread having such a special priority.
chopstx_critical (void *func (*), *arg) chopstx_critical (void *func (*), *arg)
Let run FUNC with ARG, under CPU scheduler lock (== no preemption). Let run FUNC with ARG, under CPU scheduler lock (== no preemption).
** RISC-V MCU support
RISC-V support has been added. It's for the core named Bumblebee.
* Major changes in Chopstx 1.17 * Major changes in Chopstx 1.17

View File

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