This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Threads and Handles


[ 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]