Sleep function

5 messages Options
Embed this post
Permalink
XavierL

Sleep function

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hello,
 
I'm trying to make a program wait during a certain time but I have not found a sleep() function or anything I can use for it.
How is it possible to obtain such a behaviour?
 
Thanks,
Xavier.

_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Gabi Voiculescu

Re: Sleep function

Reply Threaded More More options
Print post
Permalink
You could try using one of the okl4 timer servers, to program them to timeout and then get your application notified back upon timeout expiration.

If they are not deprecated. The iguana vtimer should be considered deprecated in okl4 3.0.

Gabi Voiculescu

--- On Wed, 8/12/09, [hidden email] <[hidden email]> wrote:

From: [hidden email] <[hidden email]>
Subject: [okl4-developer] Sleep function
To: [hidden email]
Date: Wednesday, August 12, 2009, 2:58 PM

Hello,
 
I'm trying to make a program wait during a certain time but I have not found a sleep() function or anything I can use for it.
How is it possible to obtain such a behaviour?
 
Thanks,
Xavier.

-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Josh Matthews

Re: Sleep function

Reply Threaded More More options
Print post
Permalink
In reply to this post by XavierL
Hi Xavier,

On Wed, Aug 12, 2009 at 7:58 AM, <[hidden email]> wrote:
Hello,
 
I'm trying to make a program wait during a certain time but I have not found a sleep() function or anything I can use for it.
How is it possible to obtain such a behaviour?

One way would be to use a timer device (programming the timer for a particular duration and waiting for the interrupt), if your platform supports it (which most do).

Cheers,
Josh

_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
XavierL

Re: Sleep function

Reply Threaded More More options
Print post
Permalink
In reply to this post by XavierL
Hello,

Thanks for you quick answers,
 
De : Gabi Voiculescu [mailto:[hidden email]]
You could try using one of the okl4 timer servers, to program them to timeout and then get your application notified back upon timeout expiration.
If they are not deprecated. The iguana vtimer should be considered deprecated in okl4 3.0.

De : Josh Matthews [mailto:[hidden email]]
One way would be to use a timer device (programming the timer for a particular duration and waiting for the interrupt), if your platform supports it (which most do).

As Iguana is deprecated, we won't use it but in order to clarify our view of it, can you tell us what is the right scheme? (see the attachment)
Are Iguana and its programs (clients) located in the same cell (scheme 1) or are they in individuals cells (scheme 2)?

About the timers without Iguana...
We actually use versatile under Qemu which have 4 timers(SP804). It seems that OKL4 reserves and initializes 2 timers (platform/versatile/pistachio/src/timer.c).
Timer0 is used for OKL4 system tick, but what's the purpose of Timer1 (set in free running mode)?
Are those timers protected against reconfiguration from a cell?
When we use OKLinux, it seems that it configures Timer0 and Timer3 (linux/kernel-2.6.24-v2/arch/l4/sys-arm/mach-versatile/time.c), so Timer0 is configured both in OKL4 and in OKLinux. Is there a mechanism provided by OKL4 to avoid conflicts or are we missing something?

Last question: if we set up a system with OKLinux and an other cell(which uses our sleep function), both will handle the timer device...
Is it possible, or must we implement a virtual timer server and modify OKLinux in order to call this server instead of the physical timer?

Cheers,
Damien & Xavier.



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer

iguana.png (48K) Download Attachment
Gabi Voiculescu

Re: Sleep function

Reply Threaded More More options
Print post
Permalink
I have tried to use scheme1 (which can be easily adapted by creating new iguana examples with the - current - okl4 build system):

The iguana server, the v2 driver servers, and the application using them is part of the same cell, it is just that each one of them is part of it's own space. Cell manager is iguana server, from what I understand, but I might be mistaken on this.



--- On Thu, 8/13/09, [hidden email] <[hidden email]> wrote:

From: [hidden email] <[hidden email]>
Subject: Re: [okl4-developer] Sleep function
To: [hidden email]
Date: Thursday, August 13, 2009, 12:22 PM

Hello,

Thanks for you quick answers,

De : Gabi Voiculescu [mailto:boy3dfx2@...]
You could try using one of the okl4 timer servers, to program them to timeout and then get your application notified back upon timeout expiration.
If they are not deprecated. The iguana vtimer should be considered deprecated in okl4 3.0.

De : Josh Matthews [mailto:jmatthews@...]
One way would be to use a timer device (programming the timer for a particular duration and waiting for the interrupt), if your platform supports it (which most do).

As Iguana is deprecated, we won't use it but in order to clarify our view of it, can you tell us what is the right scheme? (see the attachment)
Are Iguana and its programs (clients) located in the same cell (scheme 1) or are they in individuals cells (scheme 2)?

About the timers without Iguana...
We actually use versatile under Qemu which have 4 timers(SP804). It seems that OKL4 reserves and initializes 2 timers (platform/versatile/pistachio/src/timer.c).
Timer0 is used for OKL4 system tick, but what's the purpose of Timer1 (set in free running mode)?
Are those timers protected against reconfiguration from a cell?
When we use OKLinux, it seems that it configures Timer0 and Timer3 (linux/kernel-2.6.24-v2/arch/l4/sys-arm/mach-versatile/time.c), so Timer0 is configured both in OKL4 and in OKLinux. Is there a mechanism provided by OKL4 to avoid conflicts or are we missing something?

Last question: if we set up a system with OKLinux and an other cell(which uses our sleep function), both will handle the timer device...
Is it possible, or must we implement a virtual timer server and modify OKLinux in order to call this server instead of the physical timer?

Cheers,
Damien & Xavier.


-----Inline Attachment Follows-----

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer