From: Lionel Sambuc Date: Tue, 13 May 2014 13:13:12 +0000 (+0200) Subject: Message type for PM_GETSID X-Git-Tag: v3.3.0~279 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/mdoc.3.txt?a=commitdiff_plain;h=ca31c1caae78822cc08d73f59024cbc0faf8cce3;p=minix.git Message type for PM_GETSID Change-Id: Ife3f9f6a7b6190baca6f379f7d3c36388baf6904 --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index fa149aae2..fecfe2491 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -85,9 +85,6 @@ #define PM_SIG_SET m2_sigset /* sigset_t */ #define PM_SIG_CTX m2_p1 /* struct sigcontext * */ -/* Field names for the setsid(2) call. */ -#define PM_GETSID_PID m1_i1 /* pid_t */ - /* Field names for the getmcontext(2)/setmcontext(2) calls. */ #define PM_MCONTEXT_CTX m1_p1 /* mcontext_t * */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index bdd1758ea..50fb550c8 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -145,6 +145,13 @@ typedef struct { } mess_sigcalls; _ASSERT_MSG_SIZE(mess_sigcalls); +typedef struct { + pid_t pid; + + uint8_t padding[52]; +} mess_lc_pm_getsid; +_ASSERT_MSG_SIZE(mess_lc_pm_getsid); + typedef struct { int num; vir_bytes ptr; /* gid_t * */ @@ -1050,6 +1057,7 @@ typedef struct { mess_fs_vfs_readsuper m_fs_vfs_readsuper; mess_fs_vfs_readwrite m_fs_vfs_readwrite; + mess_lc_pm_getsid m_lc_pm_getsid; mess_lc_pm_groups m_lc_pm_groups; mess_lc_pm_itimer m_lc_pm_itimer; mess_lc_pm_priority m_lc_pm_priority; diff --git a/lib/libc/sys-minix/getsid.c b/lib/libc/sys-minix/getsid.c index 7b8170e69..dbdb56783 100644 --- a/lib/libc/sys-minix/getsid.c +++ b/lib/libc/sys-minix/getsid.c @@ -10,6 +10,6 @@ pid_t getsid(pid_t p) message m; memset(&m, 0, sizeof(m)); - m.PM_GETSID_PID = p; + m.m_lc_pm_getsid.pid = p; return(_syscall(PM_PROC_NR, PM_GETSID, &m)); } diff --git a/servers/pm/getset.c b/servers/pm/getset.c index b5263c033..2ed157c24 100644 --- a/servers/pm/getset.c +++ b/servers/pm/getset.c @@ -69,7 +69,7 @@ int do_get() case PM_GETSID: { struct mproc *target; - pid_t p = m_in.PM_GETSID_PID; + pid_t p = m_in.m_lc_pm_getsid.pid; target = p ? find_proc(p) : &mproc[who_p]; r = ESRCH; if(target)