Add a flag to grants system indicating a slot is VALID; so a slot

can be reserved (USED), while toggling VALID on and off.
This commit is contained in:
Ben Gras
2006-06-27 12:19:45 +00:00
parent a587273c56
commit 607fb6bf7f
3 changed files with 19 additions and 5 deletions

View File

@@ -90,8 +90,8 @@ endpoint_t *e_granter; /* new granter (magic grants) */
phys_copy(phys_grant, vir2phys(&g), sizeof(g));
/* Check validity. */
if(!(g.cp_flags & CPF_USED)) {
kprintf("grant verify failed: invalid\n");
if((g.cp_flags & (CPF_USED | CPF_VALID)) != (CPF_USED | CPF_VALID)) {
kprintf("grant verify failed: unused or invalid\n");
return EPERM;
}