Re: [ECOS] ecos and gettimeofday()

2005-10-21 Thread Andrew Lunn
On Fri, Oct 21, 2005 at 06:18:40PM +0200, Alexander Neundorf wrote: Hi, On Thursday 20 October 2005 19:48, Nick Garnett wrote: Andrew Lunn [EMAIL PROTECTED] writes: Hi Nick Thanks for the explanation. What i don't understand now is why only the fileio package uses these

Re: [ECOS] ecos and gettimeofday()

2005-10-21 Thread Alexander Neundorf
On Friday 21 October 2005 18:49, Andrew Lunn wrote: ... Upps, sorry. I already started working on your earlier patch. Nice to hear :-) It breaks lots of things so it is taking a while. What does it break ? I suggest you stop working on this until i commit what i've done. You can then add

Re: [ECOS] ecos and gettimeofday()

2005-10-20 Thread Nick Garnett
Andrew Lunn [EMAIL PROTECTED] writes: Additionally I'd like to move the rest of misc.c into its own CYGPKG_POSIX_MISC component, but I haven't figured out yet what cyg_posix_function_start() and cyg_posix_function_finish() exactly do. What are they required for ? Good question. They

Re: [ECOS] ecos and gettimeofday()

2005-10-20 Thread Andrew Lunn
On Thu, Oct 20, 2005 at 10:06:17AM +0100, Nick Garnett wrote: Andrew Lunn [EMAIL PROTECTED] writes: Additionally I'd like to move the rest of misc.c into its own CYGPKG_POSIX_MISC component, but I haven't figured out yet what cyg_posix_function_start() and cyg_posix_function_finish()

Re: [ECOS] ecos and gettimeofday()

2005-10-20 Thread Nick Garnett
Andrew Lunn [EMAIL PROTECTED] writes: Hi Nick Thanks for the explanation. What i don't understand now is why only the fileio package uses these functions. I would of expected at least the functions in the POSIX package to also use these. What am i missing? Many of the POSIX package

Re: [ECOS] ecos and gettimeofday()

2005-10-17 Thread Peter Korsgaard
Peter == Peter Korsgaard [EMAIL PROTECTED] writes: Peter If the problem is that you don't know if the clock DSR has run or not, Peter perhaps you could do something hackish like this to make sure Peter it hasn't: No, this also doesn't work. We want to be able to do a HAL_CLOCK_READ() and

Re: [ECOS] ecos and gettimeofday()

2005-10-16 Thread Peter Korsgaard
Alexander == Alexander Neundorf [EMAIL PROTECTED] writes: Hi, Alexander From net/ppp/current/src/sys-ecos.c: Alexander int gettimeofday(struct timeval *tv, struct timezone *tz) Alexander { Alexander cyg_tick_count_t time = cyg_current_time(); Alexander tv-tv_sec =

Re: [ECOS] ecos and gettimeofday()

2005-10-16 Thread Richard Pennington
On Sunday 16 October 2005 04:55 am, Andrew Lunn wrote: [snip] I suggest you add gettimeofday() to the end of time.cxx. I agree with Andrew that gettimeofday belongs at the end of time.cxx. It is amost identical to clock_gettime() (with ns converted to usec). Is there something about the

Re: [ECOS] ecos and gettimeofday()

2005-10-16 Thread Andrew Lunn
On Sun, Oct 16, 2005 at 07:36:03AM -0500, Richard Pennington wrote: On Sunday 16 October 2005 04:55 am, Andrew Lunn wrote: [snip] I suggest you add gettimeofday() to the end of time.cxx. I agree with Andrew that gettimeofday belongs at the end of time.cxx. It is amost identical to

Re: [ECOS] ecos and gettimeofday()

2005-10-16 Thread Richard Pennington
On Sunday 16 October 2005 07:44 am, Andrew Lunn wrote: On Sun, Oct 16, 2005 at 07:36:03AM -0500, Richard Pennington wrote: On Sunday 16 October 2005 04:55 am, Andrew Lunn wrote: [snip] I suggest you add gettimeofday() to the end of time.cxx. I agree with Andrew that gettimeofday

Re: [ECOS] ecos and gettimeofday()

2005-10-16 Thread Andrew Lunn
Much better would be to just use HAL_CLOCK_READ() for what it's designed - it is supposed to return an indication of how much time has elapsed since the last clock tick. You can use this to compute the sub-tick (sub-second) portions of the time-of-day. For an example of how to use it this

Re: [ECOS] ecos and gettimeofday()

2005-10-14 Thread Alexander Neundorf
Hi, On Thursday 13 October 2005 19:12, Andrew Lunn wrote: Jifl message made is clear that the implementation does not belong in the header file. libc is the wrong as well. The correct place would be posix since this is a posix function. It might be possible to persuade me it could go in a

Re: [ECOS] ecos and gettimeofday()

2005-10-13 Thread Andrew Lunn
On Wed, Oct 12, 2005 at 08:12:01PM +0200, Alexander Neundorf wrote: Hi, attached you can find two patches which add gettimeofday(). This patch is not intended to be commited as is, it's just a first attempt, in order to get some comments how to do it right. It does the following: it