Changes between Version 50 and Version 51 of ModParrotArchitecture

Show
Ignore:
Timestamp:
05/10/09 15:21:54 (5 years ago)
Author:
jhorwitz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModParrotArchitecture

    v50 v51  
    1616 * Context: a data structure containing information about the current connection 
    1717 * Interpreter: a Parrot interpreter ({{{Parrot_Interp}}}) 
     18 * Context pool: a pool of contexts that implements interpreter pools for threaded MPMs 
    1819 
    1920== mod_parrot Module == 
     
    3940If you are running handlers written in PIR and are including files from the Parrot runtime directory via {{{.include}}}, you will need to set the {{{PARROT_RUNTIME}}} environment variable.  This is not required if you have compiled your handlers to PBC. 
    4041 
    41 For libraries loaded via {{{load_bytecode}}}, you can add paths to Parrot's library search path with {{{ParrotIncludePath}}}.  The name of this directive is misleading and will eventually be renamed to {{{ParrotLibraryPath}}}. 
     42For libraries loaded via {{{load_bytecode}}}, you can add paths to Parrot's library search path with {{{ParrotLibraryPath}}}. 
    4243 
    4344'''Loading Code''' 
     
    192193    char *name; 
    193194    modparrot_module_info *minfo; 
     195    const char *ctx_pool_name; 
     196    apr_array_header_t *ctx_pool; 
    194197    Parrot_PMC cfg; 
    195198}; 
     
    217220=== Module Scope === 
    218221 
    219 Apache makes an obvious but significant assumption about module code.  It assumes your code knows the module to which it belongs.  So the code for mod_cgi KNOWS it's part of mod_cgi, and, as an example, its response handler can ask for the mod_cgi configuration structure appropriately.  So Apache provides no infrastructure for asking it what module code it's currently executing -- it assumes you know who you are. 
     222Apache makes an obvious but significant assumption about module code.  It assumes your code knows the module to which it belongs.  For example, code in mod_cgi KNOWS it's part of mod_cgi, and, as an example, its response handler can ask for the mod_cgi configuration structure appropriately.  So Apache provides no infrastructure for asking it what module code it's currently executing -- it assumes you know who you are. 
    220223 
    221224This is a big problem for mod_parrot, which provides SHARED hooks to support multiple HLL modules.  The same hook is called regardless of which HLL module is currently in scope, and Apache won't tell you which module it is.  This comes into play in three places: 
     
    234237and retrieve the module structure: 
    235238{{{ 
    236     mpcfg = ap_get_module_config(our_server->module_config, &parrot_module); 
    237     modp = ((module **)mpcfg->module_array->elts)[module_index]; 
     239    mpcfg = ap_get_module_config(mp_globals.base_server->module_config, 
     240        &parrot_module); 
     241    modp = ((module **)mp_globals.module_array->elts)[module_index]; 
    238242}}} 
    239243