Commit 65a04560 authored by Jan Kiszka's avatar Jan Kiszka

Revert "cobalt/kernel: Introduce __SCHED_CURRENT policy to setschedparam_ex"

This reverts commit b3c70f1a.

Was broken by design and is now no longer needed.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 4e5c96d5
......@@ -21,9 +21,6 @@
#define SCHED_COBALT 42
#define SCHED_WEAK 43
/* for internal use */
#define __SCHED_CURRENT 44
#ifndef SCHED_SPORADIC
#define SCHED_SPORADIC 10
#define sched_ss_low_priority sched_u.ss.__sched_low_priority
......
......@@ -242,7 +242,6 @@ struct xnthread_personality *cobalt_thread_finalize(struct xnthread *zombie)
int __cobalt_thread_setschedparam_ex(struct cobalt_thread *thread, int policy,
const struct sched_param_ex *param_ex)
{
struct xnthread *base_thread = &thread->threadbase;
struct xnsched_class *sched_class;
union xnsched_policy_param param;
xnticks_t tslice;
......@@ -257,15 +256,6 @@ int __cobalt_thread_setschedparam_ex(struct cobalt_thread *thread, int policy,
goto out;
}
if (policy == __SCHED_CURRENT) {
policy = base_thread->base_class->policy;
if (xnthread_base_priority(base_thread) == 0)
policy = SCHED_NORMAL;
else if (base_thread->base_class == &xnsched_class_rt &&
xnthread_test_state(base_thread, XNRRB))
policy = SCHED_RR;
}
tslice = thread->threadbase.rrperiod;
sched_class = cobalt_sched_policy_param(&param, policy,
param_ex, &tslice);
......
......@@ -202,8 +202,7 @@ DECLARE_EVENT_CLASS(syscall_exit,
{SCHED_QUOTA, "quota"}, \
{SCHED_SPORADIC, "sporadic"}, \
{SCHED_COBALT, "cobalt"}, \
{SCHED_WEAK, "weak"}, \
{__SCHED_CURRENT, "<current>"})
{SCHED_WEAK, "weak"})
const char *cobalt_trace_parse_sched_params(struct trace_seq *, int,
struct sched_param_ex *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment