Unable to use condition variables in WinCE for multithreaded application

I have a T30 on a colibri evaluation board running WINCE (abandoned Linux because of a processor affinity issue - see another post). My goal is to compile and run MTAPI which is a code platform for exercising multiple threads on multiple cores.

I am having difficulty compiling the application using MSVC 2013 and the Toradex WinCE SDK because the tools apparently don’t define a condition variable type which is standard for most Windows, Posix, and Linux tools. Thus I get a compile error.

For example, Windows defines a CONDITION_VARIABLE type, and Posix defines a pthread_cond_t type. Both serve the same purpose and can be passed into OS functions that coordinate thread access.

Wondering if anyone has seen this and if there is a workaround for it. Could not find anything in the forum about it.

R

Dear @Roger_Florida

WinCe offers various synchronization and signalling mechanisms for multithreading support, but there’s no built-in support for a CONDITION_VARIABLE.

A quick google search revealed that there seem to be (open-source) solutions for your problem, for example the Boost C++ libraries. However, we don’t have experience with this package, and building it from source code might also require some effort.

Regards,
Andy

MSVC2013 has partial C++11 support, you can use std::condition_variable