/* These are used for SYS_SCHEDULE, a reply to SCHEDULING_NO_QUANTUM */
# define SCHEDULING_ENDPOINT m9_l1
#define SCHEDULING_START (SCHEDULING_BASE+2)
-# define SCHEDULING_MAXPRIO m9_l4
#define SCHEDULING_STOP (SCHEDULING_BASE+3)
#define SCHEDULING_SET_NICE (SCHEDULING_BASE+4)
#define SCHEDULING_INHERIT (SCHEDULING_BASE+5)
} mess_pm_lc_getuid;
_ASSERT_MSG_SIZE(mess_pm_lc_getuid);
+typedef struct {
+ endpoint_t endpoint;
+ uint32_t maxprio;
+
+ uint8_t padding[48];
+} mess_pm_sched_scheduling_set_nice;
+_ASSERT_MSG_SIZE(mess_pm_sched_scheduling_set_nice);
+
typedef struct {
endpoint_t endpt;
int result;
mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
mess_pm_lsys_getprocnr m_pm_lsys_getprocnr;
+ mess_pm_sched_scheduling_set_nice m_pm_sched_scheduling_set_nice;
+
mess_rs_pm_exec_restart m_rs_pm_exec_restart;
mess_rs_pm_srv_kill m_rs_pm_srv_kill;
return rv;
}
- m.SCHEDULING_ENDPOINT = rmp->mp_endpoint;
- m.SCHEDULING_MAXPRIO = (int) maxprio;
+ m.m_pm_sched_scheduling_set_nice.endpoint = rmp->mp_endpoint;
+ m.m_pm_sched_scheduling_set_nice.maxprio = maxprio;
if ((rv = _taskcall(rmp->mp_scheduler, SCHEDULING_SET_NICE, &m))) {
return rv;
}
if (!accept_message(m_ptr))
return EPERM;
- if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) {
- printf("SCHED: WARNING: got an invalid endpoint in OOQ msg "
- "%ld\n", m_ptr->SCHEDULING_ENDPOINT);
+ if (sched_isokendpt(m_ptr->m_pm_sched_scheduling_set_nice.endpoint, &proc_nr_n) != OK) {
+ printf("SCHED: WARNING: got an invalid endpoint in OoQ msg "
+ "%d\n", m_ptr->m_pm_sched_scheduling_set_nice.endpoint);
return EBADEPT;
}
rmp = &schedproc[proc_nr_n];
- new_q = (unsigned) m_ptr->SCHEDULING_MAXPRIO;
+ new_q = m_ptr->m_pm_sched_scheduling_set_nice.maxprio;
if (new_q >= NR_SCHED_QUEUES) {
return EINVAL;
}