Message type for SYS_STATECTL

Change-Id: I19443aa018d6c670e2b44f1f98bce2fb297a7f21
This commit is contained in:
Lionel Sambuc 2014-05-23 10:18:35 +02:00
parent 333fd250f5
commit f7c72375ea
3 changed files with 13 additions and 4 deletions

View file

@ -784,6 +784,13 @@ typedef struct {
} mess_lsys_krn_sys_setalarm; } mess_lsys_krn_sys_setalarm;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm); _ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm);
typedef struct {
int request;
uint8_t padding[52];
} mess_lsys_krn_sys_statectl;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_statectl);
typedef struct { typedef struct {
time_t boot_time; time_t boot_time;
@ -1630,6 +1637,7 @@ typedef struct {
mess_lsys_krn_sys_memset m_lsys_krn_sys_memset; mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio; mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm; mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm;
mess_lsys_krn_sys_statectl m_lsys_krn_sys_statectl;
mess_lsys_krn_sys_stime m_lsys_krn_sys_stime; mess_lsys_krn_sys_stime m_lsys_krn_sys_stime;
mess_lsys_krn_sys_settime m_lsys_krn_sys_settime; mess_lsys_krn_sys_settime m_lsys_krn_sys_settime;
mess_lsys_krn_sys_times m_lsys_krn_sys_times; mess_lsys_krn_sys_times m_lsys_krn_sys_times;

View file

@ -2,7 +2,7 @@
* m_type: SYS_STATECTL * m_type: SYS_STATECTL
* *
* The parameters for this kernel call are: * The parameters for this kernel call are:
* m2_i2: CTL_REQUEST (state control request) * m_lsys_krn_sys_statectl.request (state control request)
*/ */
#include "kernel/system.h" #include "kernel/system.h"
@ -16,7 +16,7 @@ int do_statectl(struct proc * caller, message * m_ptr)
{ {
/* Handle sys_statectl(). A process has issued a state control request. */ /* Handle sys_statectl(). A process has issued a state control request. */
switch(m_ptr->CTL_REQUEST) switch(m_ptr->m_lsys_krn_sys_statectl.request)
{ {
case SYS_STATE_CLEAR_IPC_REFS: case SYS_STATE_CLEAR_IPC_REFS:
/* Clear IPC references for all the processes communicating /* Clear IPC references for all the processes communicating
@ -25,7 +25,8 @@ int do_statectl(struct proc * caller, message * m_ptr)
clear_ipc_refs(caller, EDEADSRCDST); clear_ipc_refs(caller, EDEADSRCDST);
return(OK); return(OK);
default: default:
printf("do_statectl: bad request %d\n", m_ptr->CTL_REQUEST); printf("do_statectl: bad request %d\n",
m_ptr->m_lsys_krn_sys_statectl.request);
return EINVAL; return EINVAL;
} }
} }

View file

@ -4,7 +4,7 @@ int sys_statectl(int request)
{ {
message m; message m;
m.CTL_REQUEST = request; m.m_lsys_krn_sys_statectl.request = request;
return _kernel_call(SYS_STATECTL, &m); return _kernel_call(SYS_STATECTL, &m);
} }