You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2018/11/29 18:02:05 UTC
[tcl-rivet] 03/03: giving the bridge structure variables meaningful
names in the context of bridge development
This is an automated email from the ASF dual-hosted git repository.
mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git
commit fadf3fd5e0d25511bb728bbf5a6b6d64f202c955
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Thu Nov 29 19:01:49 2018 +0100
giving the bridge structure variables meaningful names in the context of bridge development
---
src/mod_rivet_ng/mod_rivet.c | 14 +++++++-------
src/mod_rivet_ng/mod_rivet.h | 18 +++++++++---------
src/mod_rivet_ng/mod_rivet_generator.c | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/mod_rivet_ng/mod_rivet.c b/src/mod_rivet_ng/mod_rivet.c
index de15995..6cb94a5 100644
--- a/src/mod_rivet_ng/mod_rivet.c
+++ b/src/mod_rivet_ng/mod_rivet.c
@@ -292,7 +292,7 @@ Rivet_RunServerInit (apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, ser
/* bridge specific server init script */
- RIVET_MPM_BRIDGE_CALL(mpm_server_init,pPool,pLog,pTemp,s);
+ RIVET_MPM_BRIDGE_CALL(server_init,pPool,pLog,pTemp,s);
return OK;
}
@@ -366,10 +366,10 @@ Rivet_ServerInit (apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, server
exit(1);
}
- /* we require only mpm_request and mpm_thread_interp to be defined */
+ /* we require only request_processor and thread_interp to be defined */
- ap_assert(RIVET_MPM_BRIDGE_FUNCTION(mpm_request) != NULL);
- ap_assert(RIVET_MPM_BRIDGE_FUNCTION(mpm_thread_interp) != NULL);
+ ap_assert(RIVET_MPM_BRIDGE_FUNCTION(request_processor) != NULL);
+ ap_assert(RIVET_MPM_BRIDGE_FUNCTION(thread_interp) != NULL);
apr_thread_mutex_create(&module_globals->pool_mutex, APR_THREAD_MUTEX_UNNESTED, pPool);
@@ -399,7 +399,7 @@ Rivet_ServerInit (apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp, server
apr_status_t Rivet_Finalize(void* data)
{
- RIVET_MPM_BRIDGE_CALL(mpm_finalize,data);
+ RIVET_MPM_BRIDGE_CALL(child_finalize,data);
apr_threadkey_private_delete (rivet_thread_key);
return OK;
@@ -467,7 +467,7 @@ static void Rivet_ChildInit (apr_pool_t *pChild, server_rec *server)
/* Calling the brigde child process initialization */
- RIVET_MPM_BRIDGE_CALL(mpm_child_init,pChild,server);
+ RIVET_MPM_BRIDGE_CALL(thread_init,pChild,server);
apr_pool_cleanup_register (pChild,server,Rivet_Finalize,Rivet_Finalize);
}
@@ -480,7 +480,7 @@ static int Rivet_Handler (request_rec *r)
return DECLINED;
}
- return (*RIVET_MPM_BRIDGE_FUNCTION(mpm_request))(r,ctype);
+ return (*RIVET_MPM_BRIDGE_FUNCTION(request_processor))(r,ctype);
}
/*
diff --git a/src/mod_rivet_ng/mod_rivet.h b/src/mod_rivet_ng/mod_rivet.h
index 428258d..2767663 100644
--- a/src/mod_rivet_ng/mod_rivet.h
+++ b/src/mod_rivet_ng/mod_rivet.h
@@ -170,7 +170,7 @@ typedef struct _rivet_thread_interp {
typedef struct _thread_worker_private rivet_thread_private;
typedef int (RivetBridge_ServerInit) (apr_pool_t*,apr_pool_t*,apr_pool_t*,server_rec*);
-typedef void (RivetBridge_ChildInit) (apr_pool_t* pPool,server_rec* s);
+typedef void (RivetBridge_ThreadInit) (apr_pool_t* pPool,server_rec* s);
typedef int (RivetBridge_Request) (request_rec*,rivet_req_ctype);
typedef apr_status_t (RivetBridge_Finalize) (void*);
typedef rivet_thread_interp* (RivetBridge_Master_Interp) (void);
@@ -178,12 +178,12 @@ typedef int (RivetBridge_Exit_Handler) (int);
typedef rivet_thread_interp* (RivetBridge_Thread_Interp) (rivet_thread_private*,rivet_server_conf *,rivet_thread_interp*);
typedef struct _mpm_bridge_table {
- RivetBridge_ServerInit *mpm_server_init;
- RivetBridge_ChildInit *mpm_child_init;
- RivetBridge_Request *mpm_request;
- RivetBridge_Finalize *mpm_finalize;
- RivetBridge_Exit_Handler *mpm_exit_handler;
- RivetBridge_Thread_Interp *mpm_thread_interp;
+ RivetBridge_ServerInit *server_init;
+ RivetBridge_ThreadInit *thread_init;
+ RivetBridge_Request *request_processor;
+ RivetBridge_Finalize *child_finalize;
+ RivetBridge_Exit_Handler *exit_handler;
+ RivetBridge_Thread_Interp *thread_interp;
} rivet_bridge_table;
/* we need also a place where to store globals with module wide scope */
@@ -313,10 +313,10 @@ Tcl_Obj* Rivet_CurrentServerRec (Tcl_Interp* interp, server_rec* s);
}
#define RIVET_PEEK_INTERP(thread_private,running_conf) \
- (module_globals->bridge_jump_table->mpm_thread_interp)(thread_private,running_conf,NULL)
+ (module_globals->bridge_jump_table->thread_interp)(thread_private,running_conf,NULL)
#define RIVET_POKE_INTERP(thread_private,running_conf,interp) \
- (module_globals->bridge_jump_table->mpm_thread_interp)(thread_private,running_conf,interp)
+ (module_globals->bridge_jump_table->thread_interp)(thread_private,running_conf,interp)
#define RIVET_MPM_BRIDGE rivet_bridge_table bridge_jump_table =
diff --git a/src/mod_rivet_ng/mod_rivet_generator.c b/src/mod_rivet_ng/mod_rivet_generator.c
index e1d9273..8983aab 100644
--- a/src/mod_rivet_ng/mod_rivet_generator.c
+++ b/src/mod_rivet_ng/mod_rivet_generator.c
@@ -372,7 +372,7 @@ sendcleanup:
{
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, private->r,
"process terminating with code %d",private->exit_status);
- RIVET_MPM_BRIDGE_CALL(mpm_exit_handler,private->exit_status);
+ RIVET_MPM_BRIDGE_CALL(exit_handler,private->exit_status);
//Tcl_Exit(private->exit_status);
exit(private->exit_status);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org