From 6fc50062507b91e29d0adb3b889b77c169c87573 Mon Sep 17 00:00:00 2001 From: Cristiano Giuffrida Date: Mon, 3 Mar 2014 02:04:02 +0100 Subject: [PATCH] kernel: Add SYS_PRIV_CLEAR_IPC_REFS support. Change-Id: Ie5e86191d5040f305a5a42942d83319cd600bfb6 --- minix/include/minix/com.h | 1 + minix/kernel/system/do_privctl.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/minix/include/minix/com.h b/minix/include/minix/com.h index 2082eb59d..f2474f926 100644 --- a/minix/include/minix/com.h +++ b/minix/include/minix/com.h @@ -346,6 +346,7 @@ #define SYS_PRIV_QUERY_MEM 8 /* Verify memory privilege. */ #define SYS_PRIV_UPDATE_SYS 9 /* Update a sys privilege structure. */ #define SYS_PRIV_YIELD 10 /* Allow process to run and suspend */ +#define SYS_PRIV_CLEAR_IPC_REFS 11 /* Clear pending IPC for the process */ /* Constants for exec. FIXME: these do not belong here. */ #define PMEF_AUXVECTORS 20 diff --git a/minix/kernel/system/do_privctl.c b/minix/kernel/system/do_privctl.c index aa1ed57f5..ef2b9ffae 100644 --- a/minix/kernel/system/do_privctl.c +++ b/minix/kernel/system/do_privctl.c @@ -79,6 +79,11 @@ int do_privctl(struct proc * caller, message * m_ptr) RTS_SET(rp, RTS_NO_PRIV); return(OK); + case SYS_PRIV_CLEAR_IPC_REFS: + /* Clear pending IPC for the process. */ + clear_ipc_refs(rp, EDEADSRCDST); + return(OK); + case SYS_PRIV_SET_SYS: /* Set a privilege structure of a blocked system process. */ if (! RTS_ISSET(rp, RTS_NO_PRIV)) return(EPERM);