From: Lionel Sambuc Date: Tue, 13 May 2014 16:50:59 +0000 (+0200) Subject: Message type for PM_SRV_KILL X-Git-Tag: v3.3.0~252 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doxygen.log?a=commitdiff_plain;h=dbfa59164b6c3f3304a94fbbe85db0e636baeba2;p=minix.git Message type for PM_SRV_KILL Change-Id: I2d74b68db2d006dd375732a7932f20c2cf6a342a --- diff --git a/include/minix/ipc.h b/include/minix/ipc.h index b3224d9ed..55db51754 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -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; diff --git a/lib/libsys/srv_kill.c b/lib/libsys/srv_kill.c index c4287cf57..cbf860e8b 100644 --- a/lib/libsys/srv_kill.c +++ b/lib/libsys/srv_kill.c @@ -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); } diff --git a/servers/pm/signal.c b/servers/pm/signal.c index 054f69e9b..115df742a 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -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 */); } /*===========================================================================*