mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
lxip: fix timer handling and jiffies update
This commit is contained in:
parent
be753ee863
commit
9ff82d76c0
@ -47,6 +47,8 @@ class Nic_client
|
||||
if (_nic.link_state() == false || lxip_do_dhcp() == false)
|
||||
return;
|
||||
|
||||
Lx::timer_update_jiffies();
|
||||
|
||||
/* reconnect dhcp client */
|
||||
lxip_configure_dhcp();
|
||||
}
|
||||
@ -56,6 +58,8 @@ class Nic_client
|
||||
*/
|
||||
void _packet_avail()
|
||||
{
|
||||
Lx::timer_update_jiffies();
|
||||
|
||||
/* process a batch of only MAX_PACKETS in one run */
|
||||
enum { MAX_PACKETS = 20 };
|
||||
|
||||
|
@ -378,6 +378,8 @@ class Net::Socketcall : public Lxip::Socketcall,
|
||||
|
||||
void _dispatch()
|
||||
{
|
||||
Lx::timer_update_jiffies();
|
||||
|
||||
switch (_call.opcode) {
|
||||
|
||||
case OP_ACCEPT : _do_accept(); break;
|
||||
|
@ -178,8 +178,11 @@ class Lx::Timer
|
||||
if (ctx->timeout > jiffies)
|
||||
break;
|
||||
|
||||
ctx->pending = false;
|
||||
ctx->function();
|
||||
del(ctx->timer);
|
||||
|
||||
if (!ctx->pending)
|
||||
del(ctx->timer);
|
||||
}
|
||||
|
||||
/* tick the higher layer of the component */
|
||||
@ -360,3 +363,6 @@ int del_timer(struct timer_list *timer)
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
void Lx::timer_update_jiffies() { update_jiffies(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user