This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: exception rises calling cyg_thread_delete()
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Mik Prog <mikprog at gmail dot com>
- Cc: ecos-devel at ecos dot sourceware dot org
- Date: Thu, 21 Jun 2007 08:36:48 -0600
- Subject: Re: exception rises calling cyg_thread_delete()
- References: <6a7f58da0706210732q1c7f9692sab5e1cb39499f003@mail.gmail.com>
-----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-----