Changes between Version 13 and Version 14 of ModParrotArchitecture

Show
Ignore:
Timestamp:
11/29/08 17:18:36 (13 years ago)
Author:
jhorwitz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModParrotArchitecture

    v13 v14  
    153153}}} 
    154154 
     155Cleanup handlers are not real Apache handlers, as there is no "cleanup" phase in Apache.  It's actually a cleanup callback for the request pool.  Fortunately, we can provide a structure that will be passed to the callback function, and that structure can contain information about the module that registered the function: 
     156 
     157{{{ 
     158struct modparrot_cleanup_info { 
     159    int module_index;    /* the HLL module that registered us */ 
     160    Parrot_PMC callback; /* callback subroutine */ 
     161    Parrot_PMC hll_data; /* a PMC to pass to the callback */ 
     162    union {              /* internal stuff for mod_parrot */ 
     163        conn_rec *c; 
     164        request_rec *r; 
     165    } data; 
     166}; 
     167typedef struct modparrot_cleanup_info modparrot_cleanup_info; 
     168}}} 
     169 
     170{{{module_index}}} lets us know which module registered us.  {{{callback}}} is the Sub PMC that should be invoked, and {{{hll_data}}} is a PMC that should be passed to the callback.  {{{modparrot_meta_request_cleanup}}} is a generic callback function that uses this data to set the module index and call the subroutine. 
     171 
    155172== Multiprocessing Module Support == 
    156173