ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] __gnu_cxx::__concurrence_broadcast_error in code generated by gcc


From: Dmitry Vinokurov
Subject: [Ltib] __gnu_cxx::__concurrence_broadcast_error in code generated by gcc-4.3.2-glibc-2.7 (VFP with soft-float) for LPC3250
Date: Tue, 21 Jul 2009 18:06:35 +0600
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Hello

I'm developing embedded system on Phytec LPC3250 using C++ and faced strange problem: simple programs using pthreads and c++ exceptions run without any problems, but when I link my application with the following code (different stuff removed, only code that lead to error as i think):

//////////////////////////////////////////////////////////////////////////////////////////
/* Listener.h */

#include <pthread.h>

class Listener
{
public:
   Listener();
   virtual ~Listener() {}

protected:
   virtual void Listen() = 0;

private:
   pthread_t listener;
   static void *EntryPoint(void *obj);
};

//////////////////////////////////////////////////////////////////////////////////////////

/* Listener.cpp */

#include <cstring>
#include <stdlib.h>

#include "Listener.h"

Listener::Listener()
{
   // If remove following string, everything works fine
if (pthread_create(&this->listener, NULL, Listener::EntryPoint,this)) abort();
}

void *Listener::EntryPoint(void *obj)
{
   Listener *l = (Listener*)obj;
   l->Listen();
   return NULL;
}

//////////////////////////////////////////////////////////////////////////////////////////

I get unhandled exception (it arise even before entering 'main' function):
-------------------------
terminate called after throwing an instance of '__gnu_cxx::__concurrence_broadcast_error'
 what():  __gnu_cxx::__concurrence_broadcast_error
Aborted
-------------------------

Though I even don't use Listener class in my application, linking with it lead to error.

Have anybody faced same things?

Thanks in advance.

P.S.:
Phytec LPC3250 RDK
last cvs ltib revision
linux 2.6.27.8
gcc-4.3.2-glibc-2.7 (VFP with soft-float) for LPC3250 toolchain

--
Best Regards, Dmitry Vinokurov <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]