From: Lionel Sambuc Date: Wed, 14 May 2014 16:29:46 +0000 (+0200) Subject: Message type for SCHEDULING_STOP X-Git-Tag: v3.3.0~246 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.conf.5.html?a=commitdiff_plain;h=b562831340cd20c7f5d0b7ba5687c7ae1cf6f81e;p=minix.git Message type for SCHEDULING_STOP Change-Id: I372c6b9146b459698a0cead68d7cdd53ea074d77 --- diff --git a/include/minix/com.h b/include/minix/com.h index 9e5926d7f..39b2665ea 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -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) diff --git a/include/minix/ipc.h b/include/minix/ipc.h index a935eb035..4eacc63e9 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -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; diff --git a/lib/libsys/sched_stop.c b/lib/libsys/sched_stop.c index f4b3d5f76..889a03bcc 100644 --- a/lib/libsys/sched_stop.c +++ b/lib/libsys/sched_stop.c @@ -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; } diff --git a/servers/sched/schedule.c b/servers/sched/schedule.c index ec96fe752..6fac2fb82 100644 --- a/servers/sched/schedule.c +++ b/servers/sched/schedule.c @@ -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; }