Message type for SCHEDULING_STOP
Change-Id: I372c6b9146b459698a0cead68d7cdd53ea074d77
This commit is contained in:
parent
c6db5a91e7
commit
b562831340
4 changed files with 12 additions and 5 deletions
|
@ -1000,8 +1000,6 @@
|
|||
#define SCHEDULING_BASE 0xF00
|
||||
|
||||
#define SCHEDULING_NO_QUANTUM (SCHEDULING_BASE+1)
|
||||
/* 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_STOP (SCHEDULING_BASE+3)
|
||||
#define SCHEDULING_SET_NICE (SCHEDULING_BASE+4)
|
||||
|
|
|
@ -652,6 +652,13 @@ typedef struct {
|
|||
} mess_sched_lsys_scheduling_start;
|
||||
_ASSERT_MSG_SIZE(mess_sched_lsys_scheduling_start);
|
||||
|
||||
typedef struct {
|
||||
endpoint_t endpoint;
|
||||
|
||||
uint8_t padding[52];
|
||||
} mess_lsys_sched_scheduling_stop;
|
||||
_ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_stop);
|
||||
|
||||
typedef struct {
|
||||
endpoint_t endpt;
|
||||
cp_grant_id_t grant;
|
||||
|
@ -1231,6 +1238,7 @@ typedef struct {
|
|||
mess_lsys_pm_srv_fork m_lsys_pm_srv_fork;
|
||||
|
||||
mess_lsys_sched_scheduling_start m_lsys_sched_scheduling_start;
|
||||
mess_lsys_sched_scheduling_stop m_lsys_sched_scheduling_stop;
|
||||
|
||||
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
|
||||
mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
|
||||
|
|
|
@ -20,7 +20,7 @@ int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
|
|||
assert(_ENDPOINT_P(schedulee_e) >= 0);
|
||||
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.SCHEDULING_ENDPOINT = schedulee_e;
|
||||
m.m_lsys_sched_scheduling_stop.endpoint = schedulee_e;
|
||||
if ((rv = _taskcall(scheduler_e, SCHEDULING_STOP, &m))) {
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -121,9 +121,10 @@ int do_stop_scheduling(message *m_ptr)
|
|||
if (!accept_message(m_ptr))
|
||||
return EPERM;
|
||||
|
||||
if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) {
|
||||
if (sched_isokendpt(m_ptr->m_lsys_sched_scheduling_stop.endpoint,
|
||||
&proc_nr_n) != OK) {
|
||||
printf("SCHED: WARNING: got an invalid endpoint in OOQ msg "
|
||||
"%ld\n", m_ptr->SCHEDULING_ENDPOINT);
|
||||
"%d\n", m_ptr->m_lsys_sched_scheduling_stop.endpoint);
|
||||
return EBADEPT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue