[yocto] Known toolchain bug?
Wolfgang Denk
wd at denx.de
Sun Feb 16 04:26:19 PST 2014
Dear Gary Thomas,
In message <52FE2B80.9030907 at mlbassoc.com> you wrote:
> >
> > in message [1] on the Linaro mailing list, Koen Kooi reported a
> > toolchain problem. I can reproduce the same problem both in Yocto
> > 1.5.1 and witht he current top-of-tree; for example, using the latest
> > autobuilder result
> > core-image-sato-sdk-imx53qsb-20140213124023.rootfs.tar.bz2
> > I get this [source of Koen's test program attached]:
>
> Source code attachment missing?
Sorry. Here it is...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Is the glass half empty, half full, or twice as large as it needs to
-------------- next part --------------
#include <iostream>
#include <thread>
#include <mutex>
std::mutex mx;
int i;
void thrfunc();
int main(void)
{
i=0;
std::thread thr1(thrfunc),thr2(thrfunc);
thr1.join();
thr2.join();
return 0;
}
void thrfunc()
{
mx.lock();
i++;
std::cout << std::this_thread::get_id() << " i: " << i << std::endl;
mx.unlock();
}
More information about the yocto
mailing list