lxip: poll_does_not_wait() for non-blocking API

This commit is contained in:
Christian Helmuth 2017-02-12 10:50:39 +01:00 committed by Norman Feske
parent 8e6306e8e3
commit 1f29e1854a
4 changed files with 8 additions and 2 deletions

View File

@ -92,7 +92,6 @@ DUMMY_RET(0, nla_put)
DUMMY_RET(1, ns_capable)
DUMMY_RET(1, num_possible_cpus)
DUMMY_RET(0, read_seqretry)
DUMMY_RET(0, poll_does_not_wait)
DUMMY_RET(0, secpath_exists)
DUMMY_RET(0, security_inet_conn_request)
DUMMY_RET(0, security_sk_alloc)

View File

@ -368,6 +368,11 @@ void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table
_timeout->wait();
}
bool poll_does_not_wait(const poll_table *p)
{
return p == nullptr;
}
/******************
** linux/time.h **

View File

@ -56,6 +56,7 @@ class Nic_client
*/
void _packet_avail()
{
/* process a batch of only MAX_PACKETS in one run */
enum { MAX_PACKETS = 20 };
int count = 0;
@ -69,6 +70,7 @@ class Nic_client
_nic.rx()->acknowledge_packet(p);
}
/* schedule next batch if there are still packets available */
if (_nic.rx()->packet_avail())
Genode::Signal_transmitter(_sink_submit).submit();

View File

@ -176,7 +176,7 @@ class Lx::Timer
update_jiffies();
while (Lx::Timer::Context *ctx = _list.first()) {
if (ctx->timeout > jiffies)
if (ctx->timeout > jiffies)
break;
ctx->function();