1 /* The kernel call implemented in this file:
4 * The parameters for this kernel call are:
5 * m_lsys_krn_sys_statectl.request (state control request)
8 #include "kernel/system.h"
12 /*===========================================================================*
14 *===========================================================================*/
15 int do_statectl(struct proc
* caller
, message
* m_ptr
)
17 /* Handle sys_statectl(). A process has issued a state control request. */
19 switch(m_ptr
->m_lsys_krn_sys_statectl
.request
)
21 case SYS_STATE_CLEAR_IPC_REFS
:
22 /* Clear IPC references for all the processes communicating
25 clear_ipc_refs(caller
, EDEADSRCDST
);
27 case SYS_STATE_SET_STATE_TABLE
:
28 /* Set state table for the caller. */
29 priv(caller
)->s_state_table
= (vir_bytes
) m_ptr
->m_lsys_krn_sys_statectl
.address
;
30 priv(caller
)->s_state_entries
= m_ptr
->m_lsys_krn_sys_statectl
.length
;
32 case SYS_STATE_ADD_IPC_BL_FILTER
:
33 /* Add an IPC blacklist filter for the caller. */
34 return add_ipc_filter(caller
, IPCF_BLACKLIST
,
35 (vir_bytes
) m_ptr
->m_lsys_krn_sys_statectl
.address
,
36 m_ptr
->m_lsys_krn_sys_statectl
.length
);
37 case SYS_STATE_ADD_IPC_WL_FILTER
:
38 /* Add an IPC whitelist filter for the caller. */
39 return add_ipc_filter(caller
, IPCF_WHITELIST
,
40 (vir_bytes
) m_ptr
->m_lsys_krn_sys_statectl
.address
,
41 m_ptr
->m_lsys_krn_sys_statectl
.length
);
42 case SYS_STATE_CLEAR_IPC_FILTERS
:
43 /* Clear any IPC filter for the caller. */
44 clear_ipc_filters(caller
);
47 printf("do_statectl: bad request %d\n",
48 m_ptr
->m_lsys_krn_sys_statectl
.request
);
53 #endif /* USE_STATECTL */