This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix thread test cases for solaris.
On Mon, Jan 12, 2009 at 7:21 PM, Chris Fairles <chris.fairles@gmail.com> wrote:
> On Mon, Jan 12, 2009 at 7:13 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>> Chris Fairles wrote:
>>> this_thread::yield can be inlined, thread::swap can be inlined.
>>> Working on defining thread::id inline but running into issues with
>>> "thread::id this_thread::get_id()" function which requires the private
>>> ctor of thread::id. Thus, it is declared a friend in thread::id, but
>>> the friend decl needs a decl of the function... which nees a
>>> declaration of thread::id ... which, for inner classes can't be at
>>> namespace scope. Boo-urns. Will have to get around it with helper
>>> functions or something but i'm sure it can be done.
>>>
>> I see, but you can as well move this_thread::get_id to <thread> by
>> defining it in the proper place, that is after the entire thread::id,
>> marked inline. Likewise for thread::joinable, I think.
>>
>> Thanks again,
>> Paolo.
>>
>
> testing attached. (I apologise for the format of this patch. its copy
> and pasted from a putty terminal)
>
> chris
>
whoops. this doesnt work. i removed the _GLIBCXX_USE_SCHED_YIELD ...
thats what the test is using. do we not need that then? just this link
test for sched_yield?
chris