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
0b0c5d84
Commit
0b0c5d84
authored
12 years ago
by
Guy Zana
Browse files
Options
Downloads
Patches
Plain Diff
net: implement tsleep() and comment out SO_LINGER handling
parent
2f2b4fdd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bsd/porting/synch.cc
+5
-0
5 additions, 0 deletions
bsd/porting/synch.cc
bsd/porting/synch.h
+2
-0
2 additions, 0 deletions
bsd/porting/synch.h
bsd/sys/kern/uipc_socket.c
+1
-4
1 addition, 4 deletions
bsd/sys/kern/uipc_socket.c
with
8 additions
and
4 deletions
bsd/porting/synch.cc
+
5
−
0
View file @
0b0c5d84
...
...
@@ -141,6 +141,11 @@ extern "C" int msleep(void *chan, struct mtx *mtx, int priority, const char *wme
return
(
synch_port
::
instance
()
->
msleep
(
chan
,
mtx
,
priority
,
wmesg
,
timo
));
}
extern
"C"
int
tsleep
(
void
*
chan
,
int
priority
,
const
char
*
wmesg
,
int
timo
)
{
return
(
msleep
(
chan
,
0
,
priority
,
wmesg
,
timo
));
}
extern
"C"
void
wakeup
(
void
*
chan
)
{
synch_port
::
instance
()
->
wakeup
(
chan
);
...
...
This diff is collapsed.
Click to expand it.
bsd/porting/synch.h
+
2
−
0
View file @
0b0c5d84
...
...
@@ -8,6 +8,8 @@
int
msleep
(
void
*
chan
,
struct
mtx
*
mtx
,
int
priority
,
const
char
*
wmesg
,
int
timo
);
int
tsleep
(
void
*
chan
,
int
priority
,
const
char
*
wmesg
,
int
timo
);
void
wakeup
(
void
*
chan
);
void
wakeup_one
(
void
*
chan
);
...
...
This diff is collapsed.
Click to expand it.
bsd/sys/kern/uipc_socket.c
+
1
−
4
View file @
0b0c5d84
...
...
@@ -608,20 +608,17 @@ soclose(struct socket *so)
goto
drop
;
}
}
/* FIXME: OSv -SO_LINGER is not supported */
#if 0
if
(
so
->
so_options
&
SO_LINGER
)
{
if
((
so
->
so_state
&
SS_ISDISCONNECTING
)
&&
(
so
->
so_state
&
SS_NBIO
))
goto
drop
;
while
(
so
->
so_state
&
SS_ISCONNECTED
)
{
error
=
tsleep
(
&
so
->
so_timeo
,
PSOCK | PCATCH
, "soclos", so->so_linger * hz);
0
,
"soclos"
,
so
->
so_linger
*
hz
);
if
(
error
)
break
;
}
}
#endif
}
drop:
...
...
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