This is the mail archive of the ecos-devel@sourceware.org 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]

Re: exception rises calling cyg_thread_delete()


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mik Prog wrote:
> 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?

Are you sure your handle is correct?  I think you may be
dereferencing it improperly.

- --
- ------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGeo0AmaKbSsQGV8ARAu8vAJ9qlguU807KifucZRsGoR0YQaGhrwCeJBN9
2K+bzmqhyQaHZVzFtKoOU9I=
=nR79
-----END PGP SIGNATURE-----


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