Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
074c8052
Commit
074c8052
authored
12 years ago
by
Guy Zana
Browse files
Options
Downloads
Patches
Plain Diff
net: cleanups. initialize mutex in uipc_domain.h
parent
a75c1002
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bsd/sys/kern/uipc_domain.c
+6
-36
6 additions, 36 deletions
bsd/sys/kern/uipc_domain.c
with
6 additions
and
36 deletions
bsd/sys/kern/uipc_domain.c
+
6
−
36
View file @
074c8052
...
...
@@ -58,17 +58,10 @@
* See DOMAIN_SET(9) for details on its use.
*/
#if 0
static void domaininit(void *);
SYSINIT
(
domain
,
SI_SUB_PROTO_DOMAININIT
,
SI_ORDER_ANY
,
domaininit
,
NULL
);
static void domainfinalize(void *);
SYSINIT
(
domainfin
,
SI_SUB_PROTO_IFATTACHDOMAIN
,
SI_ORDER_FIRST
,
domainfinalize
,
NULL
);
#else
void
domaininit
(
void
*
);
void
domainfinalize
(
void
*
);
#endif
static
struct
callout
pffast_callout
;
static
struct
callout
pfslow_callout
;
...
...
@@ -79,8 +72,6 @@ static void pfslowtimo(void *);
struct
domain
*
domains
;
/* registered protocol domains */
int
domain_init_status
=
0
;
static
struct
mtx
dom_mtx
;
/* domain list lock */
/* FIXME: OSv: initialize this mutex properly... */
// MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF);
/*
* Dummy protocol specific user requests function pointer array.
...
...
@@ -153,10 +144,10 @@ protosw_init(struct protosw *pr)
DEFAULT
(
pu
->
pru_sense
,
pru_sense_null
);
DEFAULT
(
pu
->
pru_shutdown
,
pru_shutdown_notsupp
);
DEFAULT
(
pu
->
pru_sockaddr
,
pru_sockaddr_notsupp
);
/* FIXME: OSv: uncomment this */
//
DEFAULT(pu->pru_so
send, sosend
_generic);
// DEFAULT(pu->pru_soreceive, soreceive_generic);
//
DEFAULT(pu->pru_sopoll, sopoll_generic);
DEFAULT
(
pu
->
pru_sosend
,
sosend_generic
);
DEFAULT
(
pu
->
pru_so
receive
,
soreceive
_generic
);
/* FIXME: OSv: uncomment this */
//
DEFAULT(pu->pru_sopoll, sopoll_generic);
#undef DEFAULT
if
(
pr
->
pr_init
)
(
*
pr
->
pr_init
)();
...
...
@@ -186,29 +177,6 @@ domain_init(void *arg)
panic
(
"%s: max_datalen < 1"
,
__func__
);
}
#ifdef VIMAGE
void
vnet_domain_init
(
void
*
arg
)
{
/* Virtualized case is no different -- call init functions. */
domain_init
(
arg
);
}
void
vnet_domain_uninit
(
void
*
arg
)
{
struct
domain
*
dp
=
arg
;
struct
protosw
*
pr
;
for
(
pr
=
dp
->
dom_protosw
;
pr
<
dp
->
dom_protoswNPROTOSW
;
pr
++
)
if
(
pr
->
pr_destroy
)
(
*
pr
->
pr_destroy
)();
if
(
dp
->
dom_destroy
)
(
*
dp
->
dom_destroy
)();
}
#endif
/*
* Add a new protocol domain to the list of supported domains
* Note: you cant unload it again because a socket may be using it.
...
...
@@ -256,6 +224,8 @@ void
domaininit
(
void
*
dummy
)
{
mtx_init
(
&
dom_mtx
,
"domain list"
,
0
,
MTX_DEF
);
/*
* Before we do any setup, make sure to initialize the
* zone allocator we get struct sockets from.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment