Rename paramctl to setgrant.

This commit is contained in:
Ben Gras
2006-06-23 15:35:05 +00:00
parent add4be444f
commit 3b814d36d1
10 changed files with 63 additions and 61 deletions

View File

@@ -49,7 +49,7 @@ libsys_FILES=" \
sys_sigreturn.c \
sys_sigsend.c \
sys_privctl.c \
sys_paramctl.c \
sys_setgrant.c \
sys_times.c \
sys_trace.c \
sys_umap.c \

View File

@@ -35,7 +35,7 @@ cpf_preallocate(cp_grant_t *new_grants, int new_ngrants)
}
/* Update kernel about the table. */
if((s=sys_paramctl(SYS_PARAM_SET_GRANT, new_ngrants, new_grants, 0))) {
if((s=sys_setgrant(new_grants, new_ngrants))) {
return -1;
}
@@ -80,7 +80,7 @@ cpf_grow(void)
new_grants[g].cp_flags = 0;
/* Inform kernel about new size (and possibly new location). */
if((sys_paramctl(SYS_PARAM_SET_GRANT, new_size, new_grants, 0))) {
if((sys_setgrant(new_grants, new_size))) {
free(new_grants);
return; /* Failed - don't grow then. */
}

14
lib/syslib/sys_setgrant.c Normal file
View File

@@ -0,0 +1,14 @@
#include "syslib.h"
#include <minix/safecopies.h>
int sys_setgrant(cp_grant_t *grants, int ngrants)
{
message m;
m.SG_ADDR = (char *) grants;
m.SG_SIZE = ngrants;
return _taskcall(SYSTASK, SYS_SETGRANT, &m);
}