public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "R. Vamshi Krishna" <vamshi@cse.iitb.ac.in>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Problem in program :: Please Help
Date: Tue, 02 Aug 2005 15:27:00 -0000	[thread overview]
Message-ID: <20050802152848.GK1057@lunn.ch> (raw)
In-Reply-To: <42EF88BB.6060804@cse.iitb.ac.in>

On Tue, Aug 02, 2005 at 08:22:43PM +0530, R. Vamshi Krishna wrote:
> Hello all,
> 
> I am stuck up at a problem.  This is what I wanted to do ::
> 
>    1.  An application runs in two different modes.
>    2.  Each mode has 3 threads (distinct).
>    3.  The application must switch modes  at  every  1000 ticks.
>    4.  The individual threads of a mode will execute periodically.
> 
>    5. I have tried to use an alarm to indicate that 1000 ticks are over.
>    6. Also each thread has its own alarm to indiacte that that it's 
> period is over.
>   
> Where have I gone wrong ??

Lots....

First of you are doing things in an alarm function you are not allowed
to do. See the documentation.

Secondly as the documentation says, you should only call
cyg_thread_delete on a thread that as existed.

The strucuture you currently have is very unsafe. I suggest you throw
away your current design and start again with something more sain.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2005-08-02 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-02 14:50 R. Vamshi Krishna
2005-08-02 15:27 ` Andrew Lunn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050802152848.GK1057@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=vamshi@cse.iitb.ac.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).