You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2013/11/01 00:15:43 UTC

svn commit: r1537758 - in /perl/modperl/branches/httpd24threading: ./ src/modules/perl/ xs/APR/Pool/

Author: stevehay
Date: Thu Oct 31 23:15:42 2013
New Revision: 1537758

URL: http://svn.apache.org/r1537758
Log:
Merged revision(s) 671881 from perl/modperl/branches/threading:
expand tabs in C files
........

Modified:
    perl/modperl/branches/httpd24threading/   (props changed)
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_common_log.c
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_config.c
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_interp.c
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_module.c
    perl/modperl/branches/httpd24threading/src/modules/perl/modperl_util.h
    perl/modperl/branches/httpd24threading/xs/APR/Pool/APR__Pool.h

Propchange: perl/modperl/branches/httpd24threading/
------------------------------------------------------------------------------
  Merged /perl/modperl/branches/threading:r671881

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_cmd.c Thu Oct 31 23:15:42 2013
@@ -586,7 +586,7 @@ MP_CMD_SRV_DECLARE(perldo)
     }
 
     MP_TRACE_i(MP_FUNC, "using interp %lx to execute perl section:\n%s",
-	       scfg->mip->parent, arg);
+               scfg->mip->parent, arg);
 
     {
         SV *server = MP_PERLSECTIONS_SERVER_SV;

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_common_log.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_common_log.c?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_common_log.c (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_common_log.c Thu Oct 31 23:15:42 2013
@@ -51,9 +51,9 @@ void modperl_trace(const char *func, con
 
     if (modperl_threaded_mpm()) {
         apr_file_printf(logfile, "[%lu/%lu] ", (unsigned long)getpid(),
-			modperl_threads_started()
-			? (unsigned long)apr_os_thread_current()
-			: 0);
+                        modperl_threads_started()
+                        ? (unsigned long)apr_os_thread_current()
+                        : 0);
     }
     else {
         apr_file_printf(logfile, "[%lu] ", (unsigned long)getpid());

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_config.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_config.c?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_config.c (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_config.c Thu Oct 31 23:15:42 2013
@@ -381,7 +381,7 @@ apr_status_t modperl_config_req_cleanup(
     modperl_interp_t *interp = modperl_interp_select(r, NULL, r->server);
 
     MP_TRACE_i(MP_FUNC, "just selected: (0x%lx)->refcnt=%ld",
-	       interp, interp->refcnt);
+               interp, interp->refcnt);
     aTHX = interp->perl;
 #endif
 
@@ -389,7 +389,7 @@ apr_status_t modperl_config_req_cleanup(
 
 #ifdef USE_ITHREADS
     MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld",
-	       interp, interp->refcnt);
+               interp, interp->refcnt);
     modperl_interp_unselect(interp);
 #endif
 

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_interp.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_interp.c?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_interp.c (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_interp.c Thu Oct 31 23:15:42 2013
@@ -272,7 +272,7 @@ void modperl_interp_init(server_rec *s, 
 static apr_status_t modperl_interp_pool_cleanup(void *data)
 {
     MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-	       data, ((modperl_interp_t*)data)->refcnt);
+               data, ((modperl_interp_t*)data)->refcnt);
 
     return modperl_interp_unselect(data);
 }
@@ -287,7 +287,7 @@ apr_status_t modperl_interp_unselect(voi
 
     ap_assert(interp && MpInterpIN_USE(interp));
     MP_TRACE_i(MP_FUNC, "unselect(interp=0x%lx): refcnt=%d\n",
-	       (unsigned long)interp, interp->refcnt);
+               (unsigned long)interp, interp->refcnt);
     if (interp->refcnt != 0) {
         --interp->refcnt;
         MP_TRACE_i(MP_FUNC, "interp=0x%lx, refcnt=%d -- interp still in use",
@@ -303,7 +303,7 @@ apr_status_t modperl_interp_unselect(voi
     modperl_tipool_putback_data(mip->tipool, data, interp->num_requests);
 
     MP_TRACE_i(MP_FUNC, "interp=0x%lx freed, tipool(size=%ld, in_use=%ld)\n",
-	       (unsigned long)interp, mip->tipool->size, mip->tipool->in_use);
+               (unsigned long)interp, mip->tipool->size, mip->tipool->in_use);
 
     return APR_SUCCESS;
 }
@@ -349,14 +349,14 @@ modperl_interp_t *modperl_interp_pool_se
     modperl_interp_t *interp = NULL;
 
     if (is_startup) {
-	if (scfg) {
-	    MP_TRACE_i(MP_FUNC, "using parent interpreter at startup");
+        if (scfg) {
+            MP_TRACE_i(MP_FUNC, "using parent interpreter at startup");
 
-	    if (!scfg->mip) {
-		/* we get here if directive handlers are invoked
-		 * before server merge.
-		 */
-		modperl_init_vhost(s, p, NULL);
+            if (!scfg->mip) {
+                /* we get here if directive handlers are invoked
+                 * before server merge.
+                 */
+                modperl_init_vhost(s, p, NULL);
                 if (!scfg->mip) {
                     /* FIXME: We get here if global "server_rec" == s, scfg->mip
                      * is not created then. I'm not sure if that's bug or 
@@ -364,49 +364,49 @@ modperl_interp_t *modperl_interp_pool_se
                      */
                     return NULL;
                 }
-	    }
+            }
 
-	    interp = scfg->mip->parent;
-	}
-	else {
-	    if (!(interp = modperl_interp_pool_get(p))) {
-		interp = modperl_interp_get(s);
-		modperl_interp_pool_set(p, interp);
-
-		MP_TRACE_i(MP_FUNC, "set interp 0x%lx in pconf pool 0x%lx",
-			   (unsigned long)interp, (unsigned long)p);
-	    }
-	    else {
-		MP_TRACE_i(MP_FUNC, "found interp 0x%lx in pconf pool 0x%lx",
-			   (unsigned long)interp, (unsigned long)p);
-	    }
-	}
+            interp = scfg->mip->parent;
+        }
+        else {
+            if (!(interp = modperl_interp_pool_get(p))) {
+        	interp = modperl_interp_get(s);
+                modperl_interp_pool_set(p, interp);
+
+                MP_TRACE_i(MP_FUNC, "set interp 0x%lx in pconf pool 0x%lx",
+                           (unsigned long)interp, (unsigned long)p);
+            }
+            else {
+                MP_TRACE_i(MP_FUNC, "found interp 0x%lx in pconf pool 0x%lx",
+                           (unsigned long)interp, (unsigned long)p);
+            }
+        }
 
-	/* set context (THX) for this thread */
-	PERL_SET_CONTEXT(interp->perl);
-	/* let the perl interpreter point back to its interp */
-	MP_THX_INTERP_SET(interp->perl, interp);
+        /* set context (THX) for this thread */
+        PERL_SET_CONTEXT(interp->perl);
+        /* let the perl interpreter point back to its interp */
+        MP_THX_INTERP_SET(interp->perl, interp);
 
-	return interp;
+        return interp;
     }
     else if (!modperl_threaded_mpm()) {
-	MP_TRACE_i(MP_FUNC, "using parent interpreter in non-threaded mode");
+        MP_TRACE_i(MP_FUNC, "using parent interpreter in non-threaded mode");
 
-	/* since we are not running in threaded mode PERL_SET_CONTEXT
-	 * is not necessary */
-	/* PERL_SET_CONTEXT(scfg->mip->parent->perl); */
-	/* let the perl interpreter point back to its interp */
-	MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
+        /* since we are not running in threaded mode PERL_SET_CONTEXT
+         * is not necessary */
+        /* PERL_SET_CONTEXT(scfg->mip->parent->perl); */
+        /* let the perl interpreter point back to its interp */
+        MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
 
-	return scfg->mip->parent;
+        return scfg->mip->parent;
     }
     else {
-	request_rec *r;
-	apr_pool_userdata_get((void **)&r, "MODPERL_R", p);
-	ap_assert(r);
-	MP_TRACE_i(MP_FUNC, "found userdata MODPERL_R in pool %#lx as %lx",
-		   (unsigned long)r->pool, (unsigned long)r);
-	return modperl_interp_select(r, NULL, s);
+        request_rec *r;
+        apr_pool_userdata_get((void **)&r, "MODPERL_R", p);
+        ap_assert(r);
+        MP_TRACE_i(MP_FUNC, "found userdata MODPERL_R in pool %#lx as %lx",
+                   (unsigned long)r->pool, (unsigned long)r);
+        return modperl_interp_select(r, NULL, s);
     }
 }
 
@@ -427,9 +427,9 @@ modperl_interp_t *modperl_interp_select(
                    (unsigned long)scfg->mip->parent,
                    s->server_hostname, s->port);
         /* XXX: if no VirtualHosts w/ PerlOptions +Parent we can skip this */
-	PERL_SET_CONTEXT(scfg->mip->parent->perl);
-	/* let the perl interpreter point back to its interp */
-	MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
+        PERL_SET_CONTEXT(scfg->mip->parent->perl);
+        /* let the perl interpreter point back to its interp */
+        MP_THX_INTERP_SET(scfg->mip->parent->perl, scfg->mip->parent);
         return scfg->mip->parent;
     }
 
@@ -442,11 +442,11 @@ modperl_interp_t *modperl_interp_select(
         MP_TRACE_i(MP_FUNC,
                    "found interp 0x%lx in con config, refcnt incremented to %d\n",
                    (unsigned long)ccfg->interp, ccfg->interp->refcnt);
-	/* set context (THX) for this thread */
-	PERL_SET_CONTEXT(ccfg->interp->perl);
-	/* MP_THX_INTERP_SET is not called here because the interp
-	 * already belongs to the perl interpreter
-	 */
+        /* set context (THX) for this thread */
+        PERL_SET_CONTEXT(ccfg->interp->perl);
+        /* MP_THX_INTERP_SET is not called here because the interp
+         * already belongs to the perl interpreter
+         */
         return ccfg->interp;
     }
 
@@ -465,8 +465,8 @@ modperl_interp_t *modperl_interp_select(
     interp->ccfg = ccfg;
 
     MP_TRACE_i(MP_FUNC,
-	       "pulled interp 0x%lx from mip, num_requests is %d\n",
-	       (unsigned long)interp, interp->num_requests);
+               "pulled interp 0x%lx from mip, num_requests is %d\n",
+               (unsigned long)interp, interp->num_requests);
 
     /*
      * if a per-dir PerlInterpScope is specified, use it.
@@ -482,47 +482,47 @@ modperl_interp_t *modperl_interp_select(
                modperl_interp_scope_desc(scope));
 
     if (scope != MP_INTERP_SCOPE_HANDLER) {
-	desc = NULL;
+        desc = NULL;
         if (c && (scope == MP_INTERP_SCOPE_CONNECTION || !r)) {
-	    p = c->pool;
-	    desc = "connection";
-	}
-	else if (r) {
-	    request_rec *main_r = r->main;
+            p = c->pool;
+            desc = "connection";
+        }
+        else if (r) {
+            request_rec *main_r = r->main;
 
-	    if (main_r && (scope == MP_INTERP_SCOPE_REQUEST)) {
-		/* share 1 interpreter across sub-requests */
-		for(; main_r; main_r = main_r->main) {
-		    p = main_r->pool;
-		}
-		desc = "main request";
-	    }
-	    else {
-		p = r->pool;
-		desc = scope == MP_INTERP_SCOPE_REQUEST
+            if (main_r && (scope == MP_INTERP_SCOPE_REQUEST)) {
+                /* share 1 interpreter across sub-requests */
+                for(; main_r; main_r = main_r->main) {
+                    p = main_r->pool;
+                }
+                desc = "main request";
+            }
+            else {
+                p = r->pool;
+                desc = scope == MP_INTERP_SCOPE_REQUEST
                        ? "main request"
-		       : "sub request";
-	    }
+                       : "sub request";
+            }
 	}
 
-	ap_assert(p);
+        ap_assert(p);
 
 #ifdef MP_TRACE
-	apr_pool_cleanup_register(p, (void *)interp,
-				  modperl_interp_pool_cleanup,
-				  modperl_interp_pool_cleanup);
+        apr_pool_cleanup_register(p, (void *)interp,
+                                  modperl_interp_pool_cleanup,
+                                  modperl_interp_pool_cleanup);
 #else
-	apr_pool_cleanup_register(p, (void *)interp,
-				  modperl_interp_unselect,
-				  modperl_interp_unselect);
+        apr_pool_cleanup_register(p, (void *)interp,
+                                  modperl_interp_unselect,
+                                  modperl_interp_unselect);
 #endif
 
-	/* add a reference for the registered cleanup */
-	interp->refcnt++;
+        /* add a reference for the registered cleanup */
+        interp->refcnt++;
 
-	MP_TRACE_i(MP_FUNC,
-		   "registered unselect cleanup for interp 0x%lx in %s\n",
-		   (unsigned long)interp, desc);
+        MP_TRACE_i(MP_FUNC,
+                   "registered unselect cleanup for interp 0x%lx in %s\n",
+                   (unsigned long)interp, desc);
     }
 
     return interp;

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_module.c
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_module.c?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_module.c (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_module.c Thu Oct 31 23:15:42 2013
@@ -193,9 +193,9 @@ static void *modperl_module_config_merge
 
     if (!base_obj || (base_obj == add_obj)) {
 #ifdef USE_ITHREADS
-	MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-		   interp, interp->refcnt);
-	modperl_interp_unselect(interp);
+        MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
+                   interp, interp->refcnt);
+        modperl_interp_unselect(interp);
         MP_PERL_CONTEXT_RESTORE;
 #endif
         return addv;
@@ -248,7 +248,7 @@ static void *modperl_module_config_merge
 
 #ifdef USE_ITHREADS
     MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-	       interp, interp->refcnt);
+               interp, interp->refcnt);
     modperl_interp_unselect(interp);
     MP_PERL_CONTEXT_RESTORE;
 #endif
@@ -419,9 +419,9 @@ static const char *modperl_module_cmd_ta
 
     if (errmsg) {
 #ifdef USE_ITHREADS
-	MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-		   interp, interp->refcnt);
-	modperl_interp_unselect(interp);
+        MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
+                   interp, interp->refcnt);
+        modperl_interp_unselect(interp);
 #endif
         return errmsg;
     }
@@ -444,9 +444,9 @@ static const char *modperl_module_cmd_ta
                                                parms, &srv_obj);
         if (errmsg) {
 #ifdef USE_ITHREADS
-	    MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-		       interp, interp->refcnt);
-	    modperl_interp_unselect(interp);
+            MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
+                       interp, interp->refcnt);
+            modperl_interp_unselect(interp);
 #endif
             return errmsg;
         }
@@ -491,7 +491,7 @@ static const char *modperl_module_cmd_ta
 
 #ifdef USE_ITHREADS
     MP_TRACE_i(MP_FUNC, "unselecting: (0x%lx)->refcnt=%ld\n",
-	       interp, interp->refcnt);
+               interp, interp->refcnt);
     modperl_interp_unselect(interp);
 #endif
 
@@ -874,7 +874,7 @@ const char *modperl_module_add(apr_pool_
     if (!modperl_interp_pool_get(p)) {
         /* for vhosts */
         MP_TRACE_i(MP_FUNC, "set interp 0x%lx in pconf pool 0x%lx\n",
-		   (unsigned long)scfg->mip->parent, (unsigned long)p);
+                   (unsigned long)scfg->mip->parent, (unsigned long)p);
         modperl_interp_pool_set(p, scfg->mip->parent);
     }
 #endif

Modified: perl/modperl/branches/httpd24threading/src/modules/perl/modperl_util.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/src/modules/perl/modperl_util.h?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/src/modules/perl/modperl_util.h (original)
+++ perl/modperl/branches/httpd24threading/src/modules/perl/modperl_util.h Thu Oct 31 23:15:42 2013
@@ -137,7 +137,7 @@ int  modperl_restart_count(void);
 void modperl_pnotes_kill(void *data);
 
 SV *modperl_pnotes(pTHX_ modperl_pnotes_t *pnotes, SV *key, SV *val,
-		   apr_pool_t *pool );
+                   apr_pool_t *pool );
 
 U16 *modperl_code_attrs(pTHX_ CV *cv);
 

Modified: perl/modperl/branches/httpd24threading/xs/APR/Pool/APR__Pool.h
URL: http://svn.apache.org/viewvc/perl/modperl/branches/httpd24threading/xs/APR/Pool/APR__Pool.h?rev=1537758&r1=1537757&r2=1537758&view=diff
==============================================================================
--- perl/modperl/branches/httpd24threading/xs/APR/Pool/APR__Pool.h (original)
+++ perl/modperl/branches/httpd24threading/xs/APR/Pool/APR__Pool.h Thu Oct 31 23:15:42 2013
@@ -77,8 +77,8 @@ APR_OPTIONAL_FN_TYPE(modperl_thx_interp_
          * there are no more references, in which case                  \
          * the interpreter will be putback into the mip                 \
          */                                                             \
-        MP_TRACE_i(MP_FUNC, "DO: calling interp_unselect(0x%lx)",	\
-		   acct->interp);					\
+        MP_TRACE_i(MP_FUNC, "DO: calling interp_unselect(0x%lx)",       \
+                   acct->interp);					\
         (void)modperl_opt_interp_unselect(acct->interp);                \
     }                                                                   \
 } STMT_END
@@ -102,8 +102,8 @@ APR_OPTIONAL_FN_TYPE(modperl_thx_interp_
     if (modperl_opt_thx_interp_get) {                                   \
         if ((acct->interp = modperl_opt_thx_interp_get(aTHX))) {        \
             acct->interp->refcnt++;                                     \
-            MP_TRACE_i(MP_FUNC, "TO: (0x%lx)->refcnt incremented to %ld",	\
-		       acct->interp, acct->interp->refcnt);                 \
+            MP_TRACE_i(MP_FUNC, "TO: (0x%lx)->refcnt incremented to %ld",   \
+                       acct->interp, acct->interp->refcnt);                 \
         }                                                               \
     }                                                                   \
 } STMT_END
@@ -350,7 +350,7 @@ static MP_INLINE void mpxs_apr_pool_clea
         if ((data->interp = modperl_opt_thx_interp_get(data->perl))) {
             data->interp->refcnt++;
             MP_TRACE_i(MP_FUNC, "(0x%lx)->refcnt incremented to %ld",
-		       data->interp, data->interp->refcnt);
+                       data->interp, data->interp->refcnt);
         }
     }
 #endif