From 4ce9ca03cf7941819edea1c287158bf72aa5317b Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Mon, 23 Apr 2007 12:12:32 +0000 Subject: [PATCH] Added cpf_reload to reload the safecopy table pointer (for example after a fork). --- lib/syslib/safecopies.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/syslib/safecopies.c b/lib/syslib/safecopies.c index 468c98d77..845afc451 100644 --- a/lib/syslib/safecopies.c +++ b/lib/syslib/safecopies.c @@ -310,4 +310,13 @@ cp_grant_id_t gid; return 0; } +PUBLIC void +cpf_reload(void) +{ +/* Inform the kernel about the location of the grant table. This is needed + * after a fork. + */ + if (grants) + sys_setgrant(grants, ngrants); /* Do we need error checking? */ +}