You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2005/10/09 16:10:03 UTC

svn commit: r307438 - /apr/apr/branches/0.9.x/test/testglobalmutex.c

Author: trawick
Date: Sun Oct  9 07:09:56 2005
New Revision: 307438

URL: http://svn.apache.org/viewcvs?rev=307438&view=rev
Log:
Pick up some fixes from testprocmutex.c; now it works consistently
on RHAS 3.

These changes are apparently not applicable to other branches.

Modified:
    apr/apr/branches/0.9.x/test/testglobalmutex.c

Modified: apr/apr/branches/0.9.x/test/testglobalmutex.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/test/testglobalmutex.c?rev=307438&r1=307437&r2=307438&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/test/testglobalmutex.c (original)
+++ apr/apr/branches/0.9.x/test/testglobalmutex.c Sun Oct  9 07:09:56 2005
@@ -32,7 +32,7 @@
 
 apr_global_mutex_t *global_lock;
 apr_pool_t *pool;
-int *x;
+volatile int *x;
 
 static int make_child(apr_proc_t **proc, apr_pool_t *p)
 {
@@ -43,6 +43,10 @@
     apr_sleep (1);
 
     if (apr_proc_fork(*proc, p) == APR_INCHILD) {
+        apr_initialize();
+        
+        apr_global_mutex_child_init(&global_lock, NULL, p);
+
         while (1) {
             apr_global_mutex_lock(global_lock); 
             if (i == MAX_ITER) {