minix/kernel/system/do_statectl.c
Lionel Sambuc f7c72375ea Message type for SYS_STATECTL
Change-Id: I19443aa018d6c670e2b44f1f98bce2fb297a7f21
2014-07-28 17:05:48 +02:00

34 lines
927 B
C

/* The kernel call implemented in this file:
* m_type: SYS_STATECTL
*
* The parameters for this kernel call are:
* m_lsys_krn_sys_statectl.request (state control request)
*/
#include "kernel/system.h"
#if USE_STATECTL
/*===========================================================================*
* do_statectl *
*===========================================================================*/
int do_statectl(struct proc * caller, message * m_ptr)
{
/* Handle sys_statectl(). A process has issued a state control request. */
switch(m_ptr->m_lsys_krn_sys_statectl.request)
{
case SYS_STATE_CLEAR_IPC_REFS:
/* Clear IPC references for all the processes communicating
* with the caller.
*/
clear_ipc_refs(caller, EDEADSRCDST);
return(OK);
default:
printf("do_statectl: bad request %d\n",
m_ptr->m_lsys_krn_sys_statectl.request);
return EINVAL;
}
}
#endif /* USE_STATECTL */