This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Threads and Handles
- To: jens dot ohlund at secrc dot abb dot se
- Subject: Re: [ECOS] Threads and Handles
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Thu, 13 Jul 2000 01:19:45 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <OF543AA98A.BC20C1FF-ONC1256913.00212F77@secrc.abb.se>
[ Sorry for the delay - I was away ]
jens.ohlund@secrc.abb.se wrote:
>
> Deletion of thread:
> doJVMAgain = FALSE;
> endJVMLoop = true;
> while (doJVMAgain == FALSE)
> cyg_thread_delay(1);
> while (cyg_thread_delete(threadJVM) == FALSE);
>
> This is the code the thread is running:
[snip]
>
> while (doJVMAgain) {
> endJVMLoop = false;
[snip]
> }
>
> bindataSize = 0;
> doJVMAgain = true;
> }
I don't know the priorities of the threads here, but if they are not equal,
the cyg_thread_delete may not do what you expect. You should change that to
while (cyg_thread_delete(threadJVM) == FALSE)
cyg_thread_delay(1);
Other than that I can't particularly see what's wrong. Perhaps you would be
best sending the list (not me personally) a small *self-contained* test
case showing the problem. Also tell us your target.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault