This is the mail archive of the 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]
Other format: [Raw text]

exception rises calling cyg_thread_delete()

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

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

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