#define SYS_PRIV_UPDATE_SYS 9 /* Update a sys privilege structure. */
#define SYS_PRIV_YIELD 10 /* Allow process to run and suspend */
-/* Field names for SYS_SETGRANT */
-#define SG_ADDR m2_p1 /* address */
-#define SG_SIZE m2_i2 /* no. of entries */
-
/* Field names for SYS_FORK, _EXEC, _EXIT, GETMCONTEXT, SETMCONTEXT.*/
#define PR_ENDPT m1_i1 /* indicates a process */
#define PR_PRIORITY m1_i2 /* process priority */
} mess_lsys_krn_sys_setalarm;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm);
+typedef struct {
+ vir_bytes addr; /* cp_grant_t * */
+ int size;
+
+ uint8_t padding[48];
+} mess_lsys_krn_sys_setgrant;
+_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setgrant);
+
typedef struct {
int request;
mess_lsys_krn_sys_privctl m_lsys_krn_sys_privctl;
mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm;
+ mess_lsys_krn_sys_setgrant m_lsys_krn_sys_setgrant;
mess_lsys_krn_sys_statectl m_lsys_krn_sys_statectl;
mess_lsys_krn_sys_stime m_lsys_krn_sys_stime;
mess_lsys_krn_sys_settime m_lsys_krn_sys_settime;
* m_type: SYS_SETGRANT
*
* The parameters for this kernel call are:
- * SG_ADDR address of grant table in own address space
- * SG_SIZE number of entries
+ * m_lsys_krn_sys_setgrant.addr address of grant table in own address space
+ * m_lsys_krn_sys_setgrant.size number of entries
*/
#include "kernel/system.h"
r = EPERM;
} else {
_K_SET_GRANT_TABLE(caller,
- (vir_bytes) m_ptr->SG_ADDR,
- m_ptr->SG_SIZE);
+ m_ptr->m_lsys_krn_sys_setgrant.addr,
+ m_ptr->m_lsys_krn_sys_setgrant.size);
r = OK;
}
{
message m;
- m.SG_ADDR = (char *) grants;
- m.SG_SIZE = ngrants;
+ m.m_lsys_krn_sys_setgrant.addr = (vir_bytes)grants;
+ m.m_lsys_krn_sys_setgrant.size = ngrants;
return _kernel_call(SYS_SETGRANT, &m);
}