This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix thread test cases for solaris.


> I would ask you to figure out a way to have a single large test,
> starting from the existing one for clock-gettime, renamed. Inside, link
> tests for each of the three facilities, not run by default, etc, exactly the
> same we do for clock-gettime.

Ok. Will do. In the meantime, any ideas what we should call this
(disabled by default) --enable option?
--enable-cxx0x-thread[={rt,yes,no}] or
--enable-libstdcxx-thread[={rt,yes,no}]?
--enable-libstdcxx-librt[={yes,no}] i think would also work...
--enable-nanosleep-sched-yield-clock-gettime???

Hm, looking into this a bit, we currently have this:

#ifdef _GLIBCXX_USE_NANOSLEEP
        ::nanosleep(&__ts, 0);
#endif

inside the thread::sleep_* calls, but we should disable the functions
altogther should we not?

#ifdef _GLIBCXX_USE_NANOSLEEP
        thread::sleep_for(...)
        {
        ... ::nanosleep(...);
        }
#endif

Then wrap the testcases in a similar manner, or better yet, make
dg-requires thingies for nanosleep and sched_yield). Actually, there
already is a dg-requires for nanosleep, but its based on a compile
only test so making it a link test will fix that, i just have to add
another for sched_yield.

Chris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]