From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: jens.ohlund@secrc.abb.se Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] Threads and Handles Date: Wed, 12 Jul 2000 17:19:00 -0000 Message-id: <396D0B21.C006C242@redhat.co.uk> References: X-SW-Source: 2000-07/msg00123.html [ 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