kernel: Add SYS_PRIV_CLEAR_IPC_REFS support.

Change-Id: Ie5e86191d5040f305a5a42942d83319cd600bfb6
This commit is contained in:
Cristiano Giuffrida 2014-03-03 02:04:02 +01:00 committed by David van Moolenbroek
parent a1760b573b
commit 6fc5006250
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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);