public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Paleologos Spanos <paleolog@ee.ucla.edu>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] cyg_thread_resume
Date: Wed, 17 Jan 2001 16:23:00 -0000	[thread overview]
Message-ID: <3A663790.9BB5C70F@redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.10.10101171455270.13391-100000@sierra.ee.ucla.edu>

Paleologos Spanos wrote:
> 
>  Hi,I have a problem using the cyg_thread_resume function.
> I have configured the scheduler to have the bitmap scheduler.I tried to
> modify the scheduler so as to test if it is possible to resume an exited
> thread.However,the thread's state didn't change.
>  What I did was to add after the if loop in line :161 in the sched.cxx
> file the below code :
> Cyg_Thread  *current = Cyg_Scheduler::get_current_thread();
>      cyg_thread_kill ((cyg_handle_t) current);
>        cyg_thread_resume((cyg_handle_t) current);
> 
> I have 2 threads on the application level and I would expect that the
> output should be
> 
>  execution of thread1
>  (resume thread1)
>  execution of thread1
>  (resume thread1)
> execution of thread1
> ....
> ....
> 
>  I tested these commands without the cyg_thread_resume and the thread was
> stopped(because of the cyg_thread_kill i suppose).
>  However adding  the command ofcyg_thread_resume does not restart the
> thread.Why?
> 
>  What am I doing wrong?

Uh... you just killed yourself so you aren't running any more, so how can
you then resume? Another thread has to resume you.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine

  reply	other threads:[~2001-01-17 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-17 15:45 Paleologos Spanos
2001-01-17 16:23 ` Jonathan Larmour [this message]
2001-01-17 17:04   ` Paleologos Spanos
2001-01-17 18:17     ` Jonathan Larmour

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=3A663790.9BB5C70F@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=paleolog@ee.ucla.edu \
    /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).