Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] Corecleanup_06 has been put in incoming
Home

[Freeciv-Dev] Re: [PATCH] Corecleanup_06 has been put in incoming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Corecleanup_06 has been put in incoming
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Aug 2001 21:35:30 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Aug 19, 2001 at 01:54:20PM -0400, Ross W. Wetmore wrote:
> I have dropped a consistent set of patches to the Aug-15 CVS snapshot into
> the incoming directory along with a ReadMe attached below.
> 
> Please consider the AutoGame patch (independent of the rest) as a
> submission for CVS update.
> 
> The corecleanup6a should also be applied to CVS to fix a number of
> outstanding fault consitions in the current code base. The collection of
> updates are largely independent applications of standardizing code
> techniques across a wide range of routines. This patch however depend on
> Jason's Aug-15 update (included for completeness) and should be applied
> after his.
> 
> The remaining patches update the corecleanup source tree to Aug-15, and
> should probably be used for parallel development until there is concensus
> that this needs to be in the mainline CVS source.
> 
> Cheers,
> RossW
> =====
> 
> corecleanup_06.ReadMe:
> 
> The following patches were produced as follows:
> 
> 1)  Changes to CVS Aug-15 were merged to rev the corecleanup source.
> 2)  The result ran autogames for 48 hours on at 7-8 games/hr w/o fail.
> 3)  Jason's patch to CVS Aug-15 was merged and tested.
> 4)  A diff was made against Aug-15-JS, and the master diff file split
>     into a number of smaller patches.
> 5)  The patches were applied in order to a fresh Aug-15-CVS. 
> 6)  After the patch, each source was updated with any minor changes, 
>     rebuilt from scratch, and a sanity autogame run to verify integrity. 
>     This source tree was then diffed against the previous version to 
>     produce the final patch included below.
> 7)  The final patches were tested by applying them in sequence to an
>     Aug-15 snapshot, with build and sanity test run at each step.

It looks like you have been busy at the last time.

> Subject:  [Patch4cvs] Autogame patch
> Date:     Aug 18, 2001
> Author:   Ross Wetmore
> Status:   Tested
> State:    Submitted to CVS
> 
> Description
>   This adds changes to allow autogames to run at full speed, make a final
> auto savegame and exits when done. The GAME_MIN_TIMEOUT value is adjusted
> in DEBUG mode to allow setting a value of -1 to trigger autogame mode.
> 
> Dependencies
>   none
> 
> Files Changed:
> corecleanup_06autogame: freeciv/common/game.h
> corecleanup_06autogame: freeciv/server/sernet.c
> corecleanup_06autogame: freeciv/server/srv_main.c

I noticed that in an all-ai game the civserver process doesn't take
the full cpu like I would expect it. I have never took the time to
track it down. It looks like your patch address this problem. It this
correct? If this is the case the select() call is the problem? If so
is it possible to add something like

 int used_connections=0;

    for(i=0; i<MAX_NUM_CONNECTIONS; i++) {
      if(connections[i].used) {
         used_connections++;
      }
    }
   if(!used_connections)
       return 0;

instead of your code? Would this to the trick?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I haven't lost my mind - it's backed up on tape somewhere."


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