Skip to content
Snippets Groups Projects
Commit 0b0c5d84 authored by Guy Zana's avatar Guy Zana
Browse files

net: implement tsleep() and comment out SO_LINGER handling

parent 2f2b4fdd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment