Message type for SCHEDULING_SET_NICE
Change-Id: I4f8450b0de235627383035653ec58761fc7e3985
This commit is contained in:
parent
9f350d76ef
commit
c6db5a91e7
4 changed files with 16 additions and 7 deletions
|
@ -1003,7 +1003,6 @@
|
||||||
/* These are used for SYS_SCHEDULE, a reply to SCHEDULING_NO_QUANTUM */
|
/* These are used for SYS_SCHEDULE, a reply to SCHEDULING_NO_QUANTUM */
|
||||||
# define SCHEDULING_ENDPOINT m9_l1
|
# define SCHEDULING_ENDPOINT m9_l1
|
||||||
#define SCHEDULING_START (SCHEDULING_BASE+2)
|
#define SCHEDULING_START (SCHEDULING_BASE+2)
|
||||||
# define SCHEDULING_MAXPRIO m9_l4
|
|
||||||
#define SCHEDULING_STOP (SCHEDULING_BASE+3)
|
#define SCHEDULING_STOP (SCHEDULING_BASE+3)
|
||||||
#define SCHEDULING_SET_NICE (SCHEDULING_BASE+4)
|
#define SCHEDULING_SET_NICE (SCHEDULING_BASE+4)
|
||||||
#define SCHEDULING_INHERIT (SCHEDULING_BASE+5)
|
#define SCHEDULING_INHERIT (SCHEDULING_BASE+5)
|
||||||
|
|
|
@ -700,6 +700,14 @@ typedef struct {
|
||||||
} mess_pm_lc_getuid;
|
} mess_pm_lc_getuid;
|
||||||
_ASSERT_MSG_SIZE(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 {
|
typedef struct {
|
||||||
endpoint_t endpt;
|
endpoint_t endpt;
|
||||||
int result;
|
int result;
|
||||||
|
@ -1241,6 +1249,8 @@ typedef struct {
|
||||||
mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
|
mess_pm_lsys_getepinfo m_pm_lsys_getepinfo;
|
||||||
mess_pm_lsys_getprocnr m_pm_lsys_getprocnr;
|
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_exec_restart m_rs_pm_exec_restart;
|
||||||
mess_rs_pm_srv_kill m_rs_pm_srv_kill;
|
mess_rs_pm_srv_kill m_rs_pm_srv_kill;
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,8 @@ int sched_nice(struct mproc *rmp, int nice)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SCHEDULING_ENDPOINT = rmp->mp_endpoint;
|
m.m_pm_sched_scheduling_set_nice.endpoint = rmp->mp_endpoint;
|
||||||
m.SCHEDULING_MAXPRIO = (int) maxprio;
|
m.m_pm_sched_scheduling_set_nice.maxprio = maxprio;
|
||||||
if ((rv = _taskcall(rmp->mp_scheduler, SCHEDULING_SET_NICE, &m))) {
|
if ((rv = _taskcall(rmp->mp_scheduler, SCHEDULING_SET_NICE, &m))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,14 +264,14 @@ int do_nice(message *m_ptr)
|
||||||
if (!accept_message(m_ptr))
|
if (!accept_message(m_ptr))
|
||||||
return EPERM;
|
return EPERM;
|
||||||
|
|
||||||
if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) {
|
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 "
|
printf("SCHED: WARNING: got an invalid endpoint in OoQ msg "
|
||||||
"%ld\n", m_ptr->SCHEDULING_ENDPOINT);
|
"%d\n", m_ptr->m_pm_sched_scheduling_set_nice.endpoint);
|
||||||
return EBADEPT;
|
return EBADEPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
rmp = &schedproc[proc_nr_n];
|
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) {
|
if (new_q >= NR_SCHED_QUEUES) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue