PERFORCE change 124199 for review

Marko Zec zec at FreeBSD.org
Fri Jul 27 18:55:28 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=124199

Change 124199 by zec at zec_tpx32 on 2007/07/27 18:54:40

	Provide a dom_destroy() hook to protocol domains, which
	should be used as a reverse function to dom_init(), i.e.
	clean up state / memory that dom_init() allocates, if at all.

Affected files ...

.. //depot/projects/vimage/src/sys/kern/uipc_domain.c#6 edit
.. //depot/projects/vimage/src/sys/sys/domain.h#3 edit

Differences ...

==== //depot/projects/vimage/src/sys/kern/uipc_domain.c#6 (text+ko) ====

@@ -177,10 +177,8 @@
 	struct domain *dp = arg;
 	struct protosw *pr;
 
-#ifdef NOTYET
-	if (dp->dom_detach)
-		(*dp->dom_detach)();
-#endif
+	if (dp->dom_destroy)
+		(*dp->dom_destroy)();
 	for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
 		if (pr->pr_destroy)
 			(*pr->pr_destroy)();

==== //depot/projects/vimage/src/sys/sys/domain.h#3 (text+ko) ====

@@ -48,6 +48,8 @@
 	char	*dom_name;
 	void	(*dom_init)		/* initialize domain data structures */
 		(void);
+	void	(*dom_destroy)		/* cleanup structures / state */
+		(void);
 	int	(*dom_externalize)	/* externalize access rights */
 		(struct mbuf *, struct mbuf **);
 	void	(*dom_dispose)		/* dispose of internalized rights */


More information about the p4-projects mailing list