Deleted Added
full compact
uipc_domain.c (10358) uipc_domain.c (10653)
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93
34 * $Id: uipc_domain.c,v 1.7 1995/08/16 16:13:21 bde Exp $
34 * $Id: uipc_domain.c,v 1.8 1995/08/28 09:18:51 julian Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/socket.h>
39#include <sys/protosw.h>
40#include <sys/domain.h>
41#include <sys/mbuf.h>
42#include <sys/time.h>

--- 6 unchanged lines hidden (view full) ---

49/*
50 * System initialization
51 *
52 * Note: domain initialization wants to take place on a per domain basis
53 * as a result of traversing a linker set. Most likely, each domain
54 * want to call a registration function rather than being handled here
55 * in domaininit(). Probably this will look like:
56 *
35 */
36
37#include <sys/param.h>
38#include <sys/socket.h>
39#include <sys/protosw.h>
40#include <sys/domain.h>
41#include <sys/mbuf.h>
42#include <sys/time.h>

--- 6 unchanged lines hidden (view full) ---

49/*
50 * System initialization
51 *
52 * Note: domain initialization wants to take place on a per domain basis
53 * as a result of traversing a linker set. Most likely, each domain
54 * want to call a registration function rather than being handled here
55 * in domaininit(). Probably this will look like:
56 *
57 * SYSINIT(unique, SI_SUB_PROTO_DOMAI, SI_ORDER_ANY, domain_add, (caddr_t)xxx)
57 * SYSINIT(unique, SI_SUB_PROTO_DOMAI, SI_ORDER_ANY, domain_add, xxx)
58 *
59 * Where 'xxx' is replaced by the address of a parameter struct to be
60 * passed to the doamin_add() function.
61 */
62
63static int x_save_spl; /* used by kludge*/
58 *
59 * Where 'xxx' is replaced by the address of a parameter struct to be
60 * passed to the doamin_add() function.
61 */
62
63static int x_save_spl; /* used by kludge*/
64static void kludge_splimp __P((caddr_t));
65static void kludge_splx __P((caddr_t));
66static void domaininit __P((caddr_t));
67SYSINIT(splimp, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, kludge_splimp, (caddr_t)&x_save_spl)
64static void kludge_splimp __P((void *));
65static void kludge_splx __P((void *));
66static void domaininit __P((void *));
67SYSINIT(splimp, SI_SUB_PROTO_BEGIN, SI_ORDER_FIRST, kludge_splimp, &x_save_spl)
68SYSINIT(domain, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, domaininit, NULL)
68SYSINIT(domain, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, domaininit, NULL)
69SYSINIT(splx, SI_SUB_PROTO_END, SI_ORDER_FIRST, kludge_splx, (caddr_t)&x_save_spl)
69SYSINIT(splx, SI_SUB_PROTO_END, SI_ORDER_FIRST, kludge_splx, &x_save_spl)
70
71
72void pffasttimo __P((void *));
73void pfslowtimo __P((void *));
74
75struct domain *domains;
76
77#define ADDDOMAIN(x) { \
78 __CONCAT(x,domain.dom_next) = domains; \
79 domains = &__CONCAT(x,domain); \
80}
81
82extern struct linker_set domain_set;
83
84/* ARGSUSED*/
85static void
70
71
72void pffasttimo __P((void *));
73void pfslowtimo __P((void *));
74
75struct domain *domains;
76
77#define ADDDOMAIN(x) { \
78 __CONCAT(x,domain.dom_next) = domains; \
79 domains = &__CONCAT(x,domain); \
80}
81
82extern struct linker_set domain_set;
83
84/* ARGSUSED*/
85static void
86domaininit( udata)
87caddr_t udata; /* not used*/
86domaininit(udata)
87 void *udata; /* not used*/
88{
89 register struct domain *dp, **dpp;
90 register struct protosw *pr;
91
92 /*
93 * NB - local domain is always present.
94 */
95 ADDDOMAIN(local);

--- 30 unchanged lines hidden (view full) ---

126 * The following two operations are kludge code. Most likely, they should
127 * be done as a "domainpreinit()" for the first function and then rolled
128 * in as the last act of "domaininit()" for the second.
129 *
130 * In point of fact, it is questionable why other initialization prior
131 * to this does not also take place at splimp by default.
132 */
133static void
88{
89 register struct domain *dp, **dpp;
90 register struct protosw *pr;
91
92 /*
93 * NB - local domain is always present.
94 */
95 ADDDOMAIN(local);

--- 30 unchanged lines hidden (view full) ---

126 * The following two operations are kludge code. Most likely, they should
127 * be done as a "domainpreinit()" for the first function and then rolled
128 * in as the last act of "domaininit()" for the second.
129 *
130 * In point of fact, it is questionable why other initialization prior
131 * to this does not also take place at splimp by default.
132 */
133static void
134kludge_splimp( udata)
135caddr_t udata;
134kludge_splimp(udata)
135 void *udata;
136{
137 int *savesplp = (int *)udata;
138
139 *savesplp = splimp();
140}
141
142static void
136{
137 int *savesplp = (int *)udata;
138
139 *savesplp = splimp();
140}
141
142static void
143kludge_splx( udata)
144caddr_t udata;
143kludge_splx(udata)
144 void *udata;
145{
146 int *savesplp = (int *)udata;
147
148 splx( *savesplp);
149}
150
151
152

--- 123 unchanged lines hidden ---
145{
146 int *savesplp = (int *)udata;
147
148 splx( *savesplp);
149}
150
151
152

--- 123 unchanged lines hidden ---