Rename to preempted_context_switch (GNU/Linux).

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2019-11-22 08:52:23 +09:00
parent 2841efd9e5
commit 823ebe222c
3 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
2019-11-22 NIIBE Yutaka <gniibe@fsij.org>
* chopstx-gnu-linux.c (preempted_context_switch): Rename.
2019-11-21 NIIBE Yutaka <gniibe@fsij.org> 2019-11-21 NIIBE Yutaka <gniibe@fsij.org>
* chopstx.c (chx_sched): New common function. * chopstx.c (chx_sched): New common function.

View File

@@ -311,9 +311,11 @@ voluntary_context_switch (struct chx_thread *tp_next)
#else #else
register struct chx_thread *tp asm ("r1"); register struct chx_thread *tp asm ("r1");
/* Build stack data as if it were an exception entry. */ /* Build stack data as if it were an exception entry.
* And set the stop top to has RUNNNING.
*/
/* /*
* r0: TP scratch * r0: RUNNING scratch
* r1: 0 scratch * r1: 0 scratch
* r2: 0 scratch * r2: 0 scratch
* r3: 0 scratch * r3: 0 scratch

View File

@@ -54,7 +54,7 @@ chx_dmb (void)
} }
static void chx_preempt_into (struct chx_thread *tp_next); static void preempted_context_switch (struct chx_thread *tp_next);
static sigset_t ss_cur; static sigset_t ss_cur;
@@ -163,7 +163,7 @@ chx_handle_intr (uint32_t irq_num)
return; return;
tp_next = chx_running_preempted (tp_next); tp_next = chx_running_preempted (tp_next);
chx_preempt_into (tp_next); preempted_context_switch (tp_next);
} }
@@ -196,7 +196,7 @@ sigalrm_handler (int sig, siginfo_t *siginfo, void *arg)
if (tp_next) if (tp_next)
{ {
tp_next = chx_running_preempted (tp_next); tp_next = chx_running_preempted (tp_next);
chx_preempt_into (tp_next); preempted_context_switch (tp_next);
} }
chx_sigmask (uc); chx_sigmask (uc);
} }
@@ -224,7 +224,7 @@ chx_init_arch (struct chx_thread *tp)
} }
static void static void
chx_preempt_into (struct chx_thread *tp_next) preempted_context_switch (struct chx_thread *tp_next)
{ {
struct chx_thread *tp_prev = chx_running (); struct chx_thread *tp_prev = chx_running ();
chx_set_running (tp_next); chx_set_running (tp_next);