]> Zhao Yanbai Git Server - minix.git/commitdiff
Message type for PM_SRV_KILL
authorLionel Sambuc <lionel@minix3.org>
Tue, 13 May 2014 16:50:59 +0000 (18:50 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:42 +0000 (17:05 +0200)
Change-Id: I2d74b68db2d006dd375732a7932f20c2cf6a342a

include/minix/ipc.h
lib/libsys/srv_kill.c
servers/pm/signal.c

index b3224d9edd8e297ad25e57e34af2b0e7e70a42fd..55db51754de793cf43a7237d038ff51a2e3aaa12 100644 (file)
@@ -647,6 +647,14 @@ typedef struct {
 } mess_rs_pm_exec_restart;
 _ASSERT_MSG_SIZE(mess_rs_pm_exec_restart);
 
+typedef struct {
+       pid_t pid;
+       int nr;
+
+       uint8_t padding[48];
+} mess_rs_pm_srv_kill;
+_ASSERT_MSG_SIZE(mess_rs_pm_srv_kill);
+
 typedef struct {
        dev_t device;
        off_t seek_pos;
@@ -1163,6 +1171,7 @@ typedef struct {
                mess_pm_lsys_getprocnr  m_pm_lsys_getprocnr;
 
                mess_rs_pm_exec_restart m_rs_pm_exec_restart;
+               mess_rs_pm_srv_kill     m_rs_pm_srv_kill;
 
                mess_vfs_fs_breadwrite  m_vfs_fs_breadwrite;
                mess_vfs_fs_chmod       m_vfs_fs_chmod;
index c4287cf57d269b6118d40c5c624b373758a75353..cbf860e8bfed37eec9f4ec1378cd282444335334 100644 (file)
@@ -8,7 +8,7 @@ srv_kill(pid_t pid, int sig)
        message m;
 
        memset(&m, 0, sizeof(m));
-       m.PM_SIG_PID = pid;
-       m.PM_SIG_NR = sig;
+       m.m_rs_pm_srv_kill.pid = pid;
+       m.m_rs_pm_srv_kill.nr = sig;
        return _taskcall(PM_PROC_NR, PM_SRV_KILL, &m);
 }
index 054f69e9bce1c7bf3de66aa55c43899842a2bf9b..115df742ace72e6284e40acd04cf74000eb2e739 100644 (file)
@@ -216,7 +216,8 @@ int do_srv_kill(void)
    * to a system process. RS sends a SIGKILL when it wants to perform cleanup.
    * In that case, ksig == TRUE forces PM to exit the process immediately.
    */
-  return check_sig(m_in.PM_SIG_PID, m_in.PM_SIG_NR, TRUE /* ksig */);
+  return check_sig(m_in.m_rs_pm_srv_kill.pid, m_in.m_rs_pm_srv_kill.nr,
+         TRUE /* ksig */);
 }
 
 /*===========================================================================*