public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Equivalent of sleep() in ECOS for delay
@ 2001-07-18  9:06 Thiagarajan Rajasekaran
  2001-07-18  9:14 ` Trenton D. Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Thiagarajan Rajasekaran @ 2001-07-18  9:06 UTC (permalink / raw)
  To: ecos-discuss

Hi,
  I'm trying to look for an equivalent of sleep() in ECOS.  Is there any
delay function available in ECOS?. Please reply to me asap.

thanks,

Raj

--
****************************************************************
*   Thiagarajan Rajasekaran                                    *
*   ConnectTel, Inc.                    Austin, Texas.         *
*   Phone : 512-338-1111 Ext-104        Fax : 512-918-0449     *
*   Email : rajt@connecttel.com                                *
*   Site  : http://www.connecttel.com                          *
****************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-18  9:06 [ECOS] Equivalent of sleep() in ECOS for delay Thiagarajan Rajasekaran
@ 2001-07-18  9:14 ` Trenton D. Adams
  2001-07-18  9:58   ` Jonathan Larmour
  0 siblings, 1 reply; 7+ messages in thread
From: Trenton D. Adams @ 2001-07-18  9:14 UTC (permalink / raw)
  To: 'Thiagarajan Rajasekaran'; +Cc: 'eCos mailing list'

cyg_thread_delay (NUMms) can be used inside of a thread.

Otherwise use
    CYGACC_CALL_IF_DELAY_US(10000*NUMms);

I would think that 10000 should be changed to 1000, but I could be
wrong.  I took this out of another piece of code so I'm not really sure
about that last one.

  > -----Original Message-----
  > From: ecos-discuss-owner@sources.redhat.com [ mailto:ecos-discuss-
  > owner@sources.redhat.com] On Behalf Of Thiagarajan Rajasekaran
  > Sent: Wednesday, July 18, 2001 10:28 AM
  > To: ecos-discuss@sources.redhat.com
  > Subject: [ECOS] Equivalent of sleep() in ECOS for delay
  > 
  > Hi,
  >   I'm trying to look for an equivalent of sleep() in ECOS.  Is there
any
  > delay function available in ECOS?. Please reply to me asap.
  > 
  > thanks,
  > 
  > Raj
  > 
  > --
  > ****************************************************************
  > *   Thiagarajan Rajasekaran                                    *
  > *   ConnectTel, Inc.                    Austin, Texas.         *
  > *   Phone : 512-338-1111 Ext-104        Fax : 512-918-0449     *
  > *   Email : rajt@connecttel.com                                *
  > *   Site  : http://www.connecttel.com                          *
  > ****************************************************************
  > 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-18  9:14 ` Trenton D. Adams
@ 2001-07-18  9:58   ` Jonathan Larmour
  2001-07-19  7:35     ` Thiagarajan Rajasekaran
  2001-07-19 17:07     ` Rosimildo da Silva
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Larmour @ 2001-07-18  9:58 UTC (permalink / raw)
  To: Trenton D. Adams
  Cc: 'Thiagarajan Rajasekaran', 'eCos mailing list'

"Trenton D. Adams" wrote:
> 
> cyg_thread_delay (NUMms) can be used inside of a thread.

Yes, preferentially.

> Otherwise use
>     CYGACC_CALL_IF_DELAY_US(10000*NUMms);
> 
> I would think that 10000 should be changed to 1000, but I could be
> wrong.  I took this out of another piece of code so I'm not really sure
> about that last one.

Yes, 1000.

Or if using the POSIX compatibility package, just use sleep()!
 
Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-18  9:58   ` Jonathan Larmour
@ 2001-07-19  7:35     ` Thiagarajan Rajasekaran
  2001-07-19 17:07     ` Rosimildo da Silva
  1 sibling, 0 replies; 7+ messages in thread
From: Thiagarajan Rajasekaran @ 2001-07-19  7:35 UTC (permalink / raw)
  To: 'eCos mailing list'

Thanks a lot. I got my problem fixed.

Raj

Jonathan Larmour wrote:

> "Trenton D. Adams" wrote:
> >
> > cyg_thread_delay (NUMms) can be used inside of a thread.
>
> Yes, preferentially.
>
> > Otherwise use
> >     CYGACC_CALL_IF_DELAY_US(10000*NUMms);
> >
> > I would think that 10000 should be changed to 1000, but I could be
> > wrong.  I took this out of another piece of code so I'm not really sure
> > about that last one.
>
> Yes, 1000.
>
> Or if using the POSIX compatibility package, just use sleep()!
>
> Jifl
> --
> Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
> Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
> Come to the Red Hat TechWorld open source conference in Brussels!
> Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

--
****************************************************************
*   Thiagarajan Rajasekaran                                    *
*   ConnectTel, Inc.                    Austin, Texas.         *
*   Phone : 512-338-1111 Ext-104        Fax : 512-918-0449     *
*   Email : rajt@connecttel.com                                *
*   Site  : http://www.connecttel.com                          *
****************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-18  9:58   ` Jonathan Larmour
  2001-07-19  7:35     ` Thiagarajan Rajasekaran
@ 2001-07-19 17:07     ` Rosimildo da Silva
  2001-07-19 18:08       ` Jonathan Larmour
  1 sibling, 1 reply; 7+ messages in thread
From: Rosimildo da Silva @ 2001-07-19 17:07 UTC (permalink / raw)
  To: 'eCos mailing list'

From: "Jonathan Larmour" <jlarmour@redhat.com>
To: "Trenton D. Adams" <tadams@extremeeng.com>
Cc: "'Thiagarajan Rajasekaran'" <rajt@connecttel.com>; "'eCos mailing list'"
<ecos-discuss@sources.redhat.com>
Sent: Wednesday, July 18, 2001 11:58 AM
Subject: Re: [ECOS] Equivalent of sleep() in ECOS for delay


> "Trenton D. Adams" wrote:
> >
> > cyg_thread_delay (NUMms) can be used inside of a thread.
>
> Yes, preferentially.
>

OOPS !, I was thought that the argument for
cyg_thread_delay() was ticks !.

Rosimildo.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-19 17:07     ` Rosimildo da Silva
@ 2001-07-19 18:08       ` Jonathan Larmour
  2001-07-19 19:06         ` Rosimildo da Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Larmour @ 2001-07-19 18:08 UTC (permalink / raw)
  To: Rosimildo da Silva; +Cc: 'eCos mailing list'

Rosimildo da Silva wrote:
> 
> From: "Jonathan Larmour" <jlarmour@redhat.com>
> To: "Trenton D. Adams" <tadams@extremeeng.com>
> Cc: "'Thiagarajan Rajasekaran'" <rajt@connecttel.com>; "'eCos mailing list'"
> <ecos-discuss@sources.redhat.com>
> Sent: Wednesday, July 18, 2001 11:58 AM
> Subject: Re: [ECOS] Equivalent of sleep() in ECOS for delay
> 
> > "Trenton D. Adams" wrote:
> > >
> > > cyg_thread_delay (NUMms) can be used inside of a thread.
> >
> > Yes, preferentially.
> >
> 
> OOPS !, I was thought that the argument for
> cyg_thread_delay() was ticks !.

Actually that's right - I didn't notice that. You can use
cyg_clock_get_resolution() to get the resolution, which allows you to
convert ticks to ms.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Equivalent of sleep() in ECOS for delay
  2001-07-19 18:08       ` Jonathan Larmour
@ 2001-07-19 19:06         ` Rosimildo da Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Rosimildo da Silva @ 2001-07-19 19:06 UTC (permalink / raw)
  To: 'eCos mailing list'

From: "Jonathan Larmour" <jlarmour@redhat.com>
To: "Rosimildo da Silva" <rosimildo@hotmail.com>
Cc: "'eCos mailing list'" <ecos-discuss@sources.redhat.com>
Sent: Thursday, July 19, 2001 8:08 PM
Subject: Re: [ECOS] Equivalent of sleep() in ECOS for delay


> > > > cyg_thread_delay (NUMms) can be used inside of a thread.
> > >
> > > Yes, preferentially.
> > >
> >
> > OOPS !, I was thought that the argument for
> > cyg_thread_delay() was ticks !.
> 
> Actually that's right - I didn't notice that. You can use
> cyg_clock_get_resolution() to get the resolution, which allows you to
> convert ticks to ms.
> 

I was about to make code sources, when I've decided to check the docs. :-)

Rosimildo.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-07-19 19:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-18  9:06 [ECOS] Equivalent of sleep() in ECOS for delay Thiagarajan Rajasekaran
2001-07-18  9:14 ` Trenton D. Adams
2001-07-18  9:58   ` Jonathan Larmour
2001-07-19  7:35     ` Thiagarajan Rajasekaran
2001-07-19 17:07     ` Rosimildo da Silva
2001-07-19 18:08       ` Jonathan Larmour
2001-07-19 19:06         ` Rosimildo da Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).