]> Zhao Yanbai Git Server - minix.git/commitdiff
Message type for SCHEDULING_STOP
authorLionel Sambuc <lionel@minix3.org>
Wed, 14 May 2014 16:29:46 +0000 (18:29 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:43 +0000 (17:05 +0200)
Change-Id: I372c6b9146b459698a0cead68d7cdd53ea074d77

include/minix/com.h
include/minix/ipc.h
lib/libsys/sched_stop.c
servers/sched/schedule.c

index 9e5926d7fb8824497b0bb972f8807996a21434b1..39b2665ea04abaa49714b324716e7a65d23b4994 100644 (file)
 #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)
index a935eb03573c97239d61880656ce6d2d1dd1a94a..4eacc63e90bdcfc8d0154489e3f4ef1908be02f1 100644 (file)
@@ -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;
index f4b3d5f769d446195d218c05d0e62fdcaa682a51..889a03bcc3a429cd6b5a5d2e973aa4068002ea09 100644 (file)
@@ -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;
        }
index ec96fe752a0c690de84b4be0c51995514a2fbce8..6fac2fb82f3b33df04ce1c682430af3c3878b614 100644 (file)
@@ -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;
        }