xref: /minix/minix/kernel/system/do_statectl.c (revision 83133719)
1 /* The kernel call implemented in this file:
2  *   m_type:	SYS_STATECTL
3  *
4  * The parameters for this kernel call are:
5  *   m_lsys_krn_sys_statectl.request	(state control request)
6  */
7 
8 #include "kernel/system.h"
9 
10 #if USE_STATECTL
11 
12 /*===========================================================================*
13  *			          do_statectl				     *
14  *===========================================================================*/
15 int do_statectl(struct proc * caller, message * m_ptr)
16 {
17 /* Handle sys_statectl(). A process has issued a state control request. */
18 
19   switch(m_ptr->m_lsys_krn_sys_statectl.request)
20   {
21   case SYS_STATE_CLEAR_IPC_REFS:
22 	/* Clear IPC references for all the processes communicating
23 	 * with the caller.
24 	 */
25 	clear_ipc_refs(caller, EDEADSRCDST);
26 	return(OK);
27   default:
28 	printf("do_statectl: bad request %d\n",
29 		m_ptr->m_lsys_krn_sys_statectl.request);
30 	return EINVAL;
31   }
32 }
33 
34 #endif /* USE_STATECTL */
35