chx_running for GNU/Linux port.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2019-11-20 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* chopstx-gnu-linux.c (chx_running): New.
|
||||||
|
(chx_init_arch): Set RUNNING.
|
||||||
|
|
||||||
2019-11-19 NIIBE Yutaka <gniibe@fsij.org>
|
2019-11-19 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* chopstx-cortex-m.c (chx_running): New.
|
* chopstx-cortex-m.c (chx_running): New.
|
||||||
|
|||||||
@@ -32,6 +32,14 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
static struct chx_thread *running;
|
||||||
|
|
||||||
|
static struct chx_thread *
|
||||||
|
chx_running (void)
|
||||||
|
{
|
||||||
|
return running;
|
||||||
|
}
|
||||||
|
|
||||||
/* Data Memory Barrier. */
|
/* Data Memory Barrier. */
|
||||||
static void
|
static void
|
||||||
chx_dmb (void)
|
chx_dmb (void)
|
||||||
@@ -205,6 +213,8 @@ chx_init_arch (struct chx_thread *tp)
|
|||||||
makecontext (&idle_tc, idle, 0);
|
makecontext (&idle_tc, idle, 0);
|
||||||
|
|
||||||
getcontext (&tp->tc);
|
getcontext (&tp->tc);
|
||||||
|
|
||||||
|
running = tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user