mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-20 09:02:09 +00:00
parent
e0ee56275e
commit
9500e8b6e1
@ -48,7 +48,7 @@ namespace Lwip {
|
||||
Sys_timer(Genode::Timeout_scheduler &timer) : timer(timer) { }
|
||||
};
|
||||
|
||||
static Genode::Constructible<Sys_timer> _sys_timer;
|
||||
static Sys_timer *sys_timer_ptr;
|
||||
|
||||
void genode_init(Genode::Allocator &heap, Genode::Timeout_scheduler &timer)
|
||||
{
|
||||
@ -56,7 +56,10 @@ namespace Lwip {
|
||||
!heap.need_size_for_free());
|
||||
|
||||
_heap = &heap;
|
||||
_sys_timer.construct(timer);
|
||||
|
||||
static Sys_timer sys_timer(timer);
|
||||
sys_timer_ptr = &sys_timer;
|
||||
|
||||
lwip_init();
|
||||
}
|
||||
}
|
||||
@ -93,7 +96,7 @@ extern "C" {
|
||||
}
|
||||
|
||||
u32_t sys_now(void) {
|
||||
return Lwip::_sys_timer->timer.curr_time().trunc_to_plain_ms().value; }
|
||||
return Lwip::sys_timer_ptr->timer.curr_time().trunc_to_plain_ms().value; }
|
||||
|
||||
void genode_memcpy(void *dst, const void *src, size_t len) {
|
||||
Genode::memcpy(dst, src, len); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user