- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone been able to get a program written in C++ (using STL) and using pthreads to run succesfully on uClinux?
Depending on which toolchain I use, I can get one or the other to work, but not both.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
He have successfully developed a large application which uses STL extensively, especially container templates.
However, we weren't able to compile even the simplest application with C++ and pthreads combined. If I recall correctly, we could make a sample application run, but when we used strings, vectors, or any interesting stuff, the test program would halt. Cheers, Ricardo.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In a no-MMU environment "__thread" variables are not available, this might prevent c++ in a threaded application.
In an MMU enabled environment atomic operations are not (yet) functional. This will result in a memory manager work either slow (using OS based locks) or not correctly (when trying to use the not yet implemented atomic functions). -Michael- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its weird that if I compile a C program with pthreads, it works fine. But if I compile a C++ program with pthreads, it hangs at the first pthread_create call. I'm pretty fuzzy on the low level details, but why would there be a difference there?
Thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have any restrictions on using the MMU Linux distribution? (http://www.nioswiki.com/linux)
It seems like it should be more capable of handling this kind of task correctly. Unfortunately, we are just starting experimenting with it, so I don't have much useful advise. Good luck, Ricardo.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, the card we are using doesn't have an MMU, so that probably won't work for me. Thanks for the advice though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe you should upgrade your NIOS to an MMU enabled version...
-Michael- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I'd like to ask similar question on pthreads and C++.
I managed to compiled my application that uses pthreads using nios2-linux-uclibc-g++. So my question is whether it is best for me to run my application in nios2 with MMU or no MMU, in order to get thread atomicity etc? Thank you. Chiang
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page