[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuchess-5.07 threading problem

From: Simon Waters
Subject: Re: gnuchess-5.07 threading problem
Date: Thu, 11 Mar 2004 22:58:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Krister Walfridsson wrote:

Hi Krister,

thanks for this report.

> I tried to use gnuchess-5.07 on a platform that does not have native
> threads, but that use the non-preemptive PTH library instead.

Care to name the platform? (I'm just curious).

Better yet can we spot non-preemptive thread library at config time?

We don't want to yield from the thinking thread unnecessarily (although
it may not matter much if we do I guess).

> This can be solved with an explicit sched_yield() as in the patch below,
> although you might want to find a better place to place that call, in
> order to give a more responsive user interface...

In "Search" in search.c every so often we do some housekeeping.

look for..
>> if (((flags & PONDER) || SearchDepth == 0) && (NodeCnt & TIMECHECK) == 0)

This is probably the right place and frequency to do a yield, but we
might want to do it only when "NodeCnt & TIMECHECK" is true but other
end conditions are false.

We still have a known bug in the handling of games being reset whilst
the machine is thinking, does this cause a problem when you have no
pre-emptive threads?

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]