Compile Intel Threading Building Blocks

I’m evaluating some Multi-threading libraries, I understand that Intel TBB worked under QNX with patches at some point.

I was wondering if anyone has compiled the library recently, version 4 or newer. It doesn’t seem to compile out of the box.
My QNX version is 6.4.1 and my gcc version is 4.3.3.


I had never heard of TBB before reading this so I went and found an Intel description. It really sounds like a nice product for taming a non-realtime OS where you want to write a large multi-threaded do everything process that needs to priorities things. It does it’s own internal scheduling.

No offense intended, but this seems like nothing you would want to use with QNX, unless you don’t know what you are doing.

The description suggested that the library would help you avoid having too much competition for the available cores, and it would let you prioritize threads into varying categories of importance. The only way this would be of help in QNX would be if you run a single process with lots of cpu bound threads, all at the same priority. And if you are doing this on QNX, (apologies) you don’t know what you are doing.

Sorry I’m not more helpful.

Just for curiosity, and if it’s not much asking, what kind of applications do you work with? Why do you discourage a multi-threading application in a RTOS?

I agree with maschoen… there must be good reasons to use a tool like this. Doesn’t it make the code more complex and more diffcult to maintain? Isn’t it easier to just call pthread_create() and start your threads? I wouldn’t abtract thread creation away in a library like this. How do you want to debug it…, etc.

Hi, Thunderblade.

At this point, it’s only a consideration. I’m barely glancing at new threading libraries. The use of such a library would be minimal to non-existant, only to selectively make code less complex, to introduce less bugs and code to maintain. It may be the case that I find no such case in my code base, anyways, but I wanted to have the tool available. I thought that would be fairly easy to do, but new versions don’t have QNX patches, so I may not spend much time trying to use the library if it’s not been actively used by QNX community.

I do agree with maschoen too, as limited as our context consideration and understanding is.

You may consider this a purely academical question :slight_smile:

I work with a very wide range of applications. I am not discouraging using multi-threading outright. I deal with many clients who come from a Windows or Linux environment where they are used to building an application into a single process with many threads. While it will work, this is the worst way to build an application on QNX. It is much easier, safer (QNX likes the word robust here) to separate functions into processes and to have the various processes communicate with low level message passing. This is oversimplified as there are many nuances to QNX message passing, for example, when to use pulses, when to use a multi-threaded resource manager, and when to use extra threads in a client. The advantages are significant. For example, if a part of your application crashes, it is possible to restart that process without impacting the rest of the application.

TBB seems to be adding the ability to prioritize threads on a system that doesn’t have any real time capabilities. But that functionality is already part of the QNX scheduler, so why add another scheduler on top?

Thunderblade, if you haven’t before, you should take a look at what TBB does:

The only reason I can see for using it under QNX is if one wants clean portability to other OS’s. But if one needs to run on other OS’s, why run on QNX at all?