[PATCH 3/6] generation number unset

2006-05-04 Thread Chris Darroch
Hi --

   This may not be necessary, but I notice that prefork and most of
the other MPMs set ap_my_generation to an initial value of zero.
The worker and event MPMs don't, though.

Chris.

=
--- server/mpm/experimental/event/event.c.orig  2006-05-03 07:20:37.953905913 
-0400
+++ server/mpm/experimental/event/event.c   2006-05-03 10:37:41.262464486 
-0400
@@ -395,7 +395,7 @@
 static int volatile restart_pending;
 static int volatile is_graceful;
 static volatile int child_fatal;
-ap_generation_t volatile ap_my_generation;
+ap_generation_t volatile ap_my_generation = 0;
 
 /*
  * ap_start_shutdown() and ap_start_restart(), below, are a first stab at
--- server/mpm/worker/worker.c.orig 2006-05-02 22:24:09.727476765 -0400
+++ server/mpm/worker/worker.c  2006-05-03 10:37:26.814544916 -0400
@@ -353,7 +353,7 @@
 static int volatile restart_pending;
 static int volatile is_graceful;
 static volatile int child_fatal;
-ap_generation_t volatile ap_my_generation;
+ap_generation_t volatile ap_my_generation = 0;
 
 /*
  * ap_start_shutdown() and ap_start_restart(), below, are a first stab at


Re: [PATCH 3/6] generation number unset

2006-05-04 Thread Colm MacCarthaigh
On Thu, May 04, 2006 at 01:36:54PM -0400, Chris Darroch wrote:
This may not be necessary, but I notice that prefork and most of
 the other MPMs set ap_my_generation to an initial value of zero.
 The worker and event MPMs don't, though.

Yes, we don't have any consistency in the actual code here but the
result is always the same as the compiler will make sure that they are
zero-initialised. Although I did hit a curious compiler optimisation bug
which destroyed this assumption a few months back (that bug has since
been fixed though).

It's no mark making the initialisations explicit though anyway.
 
-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]