[ECOS] Threads and Handles

Jonathan Larmour jlarmour@redhat.co.uk
Wed Jul 12 17:19:00 GMT 2000


[ 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


More information about the Ecos-discuss mailing list