public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* exception rises calling cyg_thread_delete()
@ 2007-06-21 14:32 Mik Prog
  2007-06-21 14:36 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Mik Prog @ 2007-06-21 14:32 UTC (permalink / raw)
  To: ecos-devel

Hello everyone,

apologies if the argument has been discussed already (could not find
anything about it!).
I'm new in eCos world and now I am facing an annoying problem: I get a
crash calling cyg_thread_delete().

The exception I get is on Cyg_Alarm::~Cyg_Alarm(), which is called by
cyg_thread_delete().

The most annoying thing is that this crash happens randomly: I have an
environment running 7 threads, out of which 6 should be deleted.
Deleting the first one is usually Ok and crash happens when deleting
2nd or 3rd or 4th and so on... randomly.

I first call the release function, just to unlock pending calls:

    cyg_thread_release( *(cyg_handle_t*)(pHandle) );

then the deletion one, which crashes:

    if ( ! cyg_thread_delete (*(cyg_handle_t*)(pHandle)) )
    {
        diag_printf("\nERROR: Thread deletion failed!\n");   // I
don't get this: an exception arise.
    }

I've tried to suspend the thread before delete it, but doesn't help.

Does anyone has any clue about what is going on?


Any help would be appreciated!
Thanks a lot!
 Mik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-23 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-21 14:32 exception rises calling cyg_thread_delete() Mik Prog
2007-06-21 14:36 ` Gary Thomas
2007-06-23 10:21   ` Mik Prog

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).