hi

i worked on the issue for a while. unfortunatelly i was not able to work out the bottleneck because it's something very different on the two machines. I cannot say that they have
an uncommon installisation because both has a default windows xp installation, on is
based on an amd single core cpu the other on a mutlicore cpu. but the issue
is near the Sleep(..) command if we use it, then the issue will arrive. something goes very wrong. i will continue working on.

i will be very open for any ideas and suggestions.

/adegli

2006/7/7, Robert Osfield <[EMAIL PROTECTED]>:
On 7/7/06, Thibault Genessay <[EMAIL PROTECTED]> wrote:
> void SwitchToThread(void) (NT/2000/XP/2K3) does the job. (On W2k3
> platforms, there exist the YieldProcessor macro but I don't know
> exactly what it does ...)

Re-examining the the code in OpenThreads, it  uses SwitchToThread but
fallsback to Sleep(10) for older versions :

#if _WIN32_WINNT < 0x0400 // simulate
int SwitchToThread (void)
{
    ::Sleep(10);
    return 0;
};
#endif

int Thread::YieldCurrentThread()
{
    return SwitchToThread();
}


> Adrian, maybe you can modify OpenThreads, replacing Sleep(10) by
> SwitchToThread() and see if it improves your performance.

That depends on what OS Adrian is using...

> > There are pthread implementations under Windows, perhaps you could use this.
> Won't those be based on Win32 API, thus adding an extra layer between
> OpenThreads and Windows ?

Yes I believe this will be the case.  That being said some users
originally found the pthreads path more stable under Windows than the
direct Win32 path.... not sure what pthreads was adding extra in turns
of protection.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to