Hello,
osmo-trx-lms: Threads.cpp:133: void Thread::start(void* (*)(void*), void*): Assertion `!res' failed. [...] Can someone provide me a little light on this?
As far as I can see, pthread_attr_setstacksize() fails to set required stack size for a thread. Probably, the amount of RAM is not enough. But in general, this part of code looks dirty:
/** A C++ wrapper for pthread threads. */ class Thread { /* ... */ // FIXME -- Can this be reduced now? size_t mStackSize;
/* ... */ /** Create a thread in a non-running state. */ Thread(size_t wStackSize = (65536*4)):mThread((pthread_t)0) { pthread_attr_init(&mAttrib); // (pat) moved this here. mStackSize=wStackSize; } /* ... */
I am now wondering, where does this magic 65536*4 comes from, and how can we estimate and adjust this properly?
With best regards, Vadim Yanitskiy.