2010-04-08 15:41:35 +02:00
|
|
|
/* The kernel call implemented in this file:
|
|
|
|
* m_type: SYS_STATECTL
|
|
|
|
*
|
|
|
|
* The parameters for this kernel call are:
|
2014-05-23 10:18:35 +02:00
|
|
|
* m_lsys_krn_sys_statectl.request (state control request)
|
2010-04-08 15:41:35 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "kernel/system.h"
|
|
|
|
|
|
|
|
#if USE_STATECTL
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_statectl *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int do_statectl(struct proc * caller, message * m_ptr)
|
2010-04-08 15:41:35 +02:00
|
|
|
{
|
|
|
|
/* Handle sys_statectl(). A process has issued a state control request. */
|
|
|
|
|
2014-05-23 10:18:35 +02:00
|
|
|
switch(m_ptr->m_lsys_krn_sys_statectl.request)
|
2010-04-08 15:41:35 +02:00
|
|
|
{
|
|
|
|
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:
|
2014-05-23 10:18:35 +02:00
|
|
|
printf("do_statectl: bad request %d\n",
|
|
|
|
m_ptr->m_lsys_krn_sys_statectl.request);
|
2010-04-08 15:41:35 +02:00
|
|
|
return EINVAL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* USE_STATECTL */
|