コード例 #1
0
static struct sched_thd *fp_get_second_highest_prio(struct sched_thd *highest)
{
	struct sched_thd *t;

	fp_rem_thd(highest);
	t = fp_get_highest_prio();
	fp_add_start_runnable(highest);

	return t;
}
コード例 #2
0
ファイル: fp_rr.c プロジェクト: Neymello/Composite
struct sched_thd *schedule(struct sched_thd *t)
{
	struct sched_thd *n;

	assert(!t || !sched_thd_member(t));
	n = fp_get_highest_prio();
	assert(n);
	if (n != t) return n;
	assert(t);
	return fp_get_second_highest_prio(n);
}
コード例 #3
0
static struct sched_thd *fp_get_second_highest_prio(struct sched_thd *highest)
{
	struct sched_thd *t;

	fp_rem_thd(highest);
	t = fp_get_highest_prio();
	fp_add_start_runnable(highest);

	/* printc("second highest thd %d\n", t->id); */
	return t;
}
コード例 #4
0
struct sched_thd *schedule(struct sched_thd *t)
{
	struct sched_thd *n;

	assert(!t || !sched_thd_member(t));
	/* printc("get the highest_prio ---> "); */
	n = fp_get_highest_prio();
	assert(n);
	if (n != t) return n;
	assert(t);
	/* printc("get the 2nd highest_prio ---> "); */
	return fp_get_second_highest_prio(n);
}