[okl4-developer] About jiffies in wombat
kashin Lin
kashin08 at gmail.com
Fri Jan 11 17:05:31 EST 2008
Hi Nelson,
after adding #include<iguana/env.h> in drivers_example.c, i got some errors
like:
iguana/example/drivers/src/drivers_example.c:379: warning: passing arg 1 of
`iguana_getenv' makes pointer from integer without a cast
iguana/example/drivers/src/drivers_example.c:379: warning: passing arg 1 of
`memsection_lookup' makes integer from pointer without a cast
but if i case the type directly as following, okl4 will fail due to page
fault at run time.
memsection_lookup((objref_t)iguana_getenv((const char *)0x900), &server_);
so how to fix it?
thanks in advance~
Best,
kashin lin
2008/1/10, Nelson Tam <nelson at ok-labs.com>:
>
> Hi Kashin,
>
> On 09/01/2008, at 4:29 AM, kashin Lin wrote:
>
> > when i build okl4 with "driver" example, i got following warnings
> > and abort building process.
>
> The function "iguana_getenv()" is defined in libs/iguana/src/env.c.
> The header
> declaration is in libs/iguana/include/env.h. Please check that the
> header file
> is included in drivers_example.c.
>
> > i have some addition question about timer driver:
> > what does"handling timeouts correctly" mean?
> > does it mean i should check if timer's period setting effectively?
> > or there are some actions i should do when timeout occurs? (ex: ?)
>
> Two things:
>
> 1. like you said, setting a periodic timer such that you get periodic
> timeouts
> 2. calling current_time() and looking at the results
>
> > what should i implement in "device_interrupt_impl" ?
> > what does the return value indicate?
>
>
> Typically a few things:
>
> - acknowledge the interrupt on the device, such as clearing
> interrupt bits, if
> needed
> - do whatever is appropriate depending on the reason for the
> interrupt, such as
> handling timer overflows etc.
> - the return value is given back to the device server. The device
> server is free
> to do whatever it wants with the return value
>
> Enjoy,
> Nelson.
> --
> (nt)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080111/857899d5/attachment.htm
More information about the Developer
mailing list