Changeset 4240c10c43e30e0222824fb249f84ba1066f6c44

Show
Ignore:
Timestamp:
12/17/11 18:33:53 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1324146833 -0500
git-parent:

[8da7f661e3730fd14d4f0f64bd0aebe21afac7e5]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1324146833 -0500
Message:

typo fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_hooks.h

    r8da7f66 r4240c10  
    4141 * and the noit_hooks system is what satisfies this need.</para> 
    4242 * <para>The design goals here are somewhat specific in that we 
    43  * would like to allow for a large number of hook points at low cost 
     43 * would like to allow for a large number of hook points at a low cost 
    4444 * when not instrumented.  As such, a hash lookup of registered hooks 
    45  * would be considered to expensive.  Additionally, we want to provide 
    46  * strong, compile-time type safety as it can be all to easy to hook 
    47  * something with a function with a slightly incorrect protoype that 
    48  * could result in disasterous corruption or crashes (or perhaps worse 
     45 * would be considered too expensive.  Additionally, we want to provide 
     46 * strong, compile-time type-safety as it can be all to easy to hook 
     47 * something with a function with a incorrect protoype that 
     48 * could result in disasterous corruption or crashes (or perhaps worse: 
    4949 * daftly subtle bugs that are punishing to troubleshoot).</para> 
    5050 * <para>The hooks system is simple a set of two macros; one allowing 
     
    6060 *   the name of the hook (a term that composes a valid C function name), 
    6161 *   the arguments it expects, the type of closure (usually a void *), 
    62  *   and some variations on those themes that provide CPP enough info 
     62 *   and some variations on those themes that provide CPP enough information 
    6363 *   to construct an implementation with no programmer "programming." 
    6464 *   </para> 
     
    7575 *   <example> 
    7676 *   <title>Implementing a foobarquux hook in source.</title> 
    77  *   <para>A foobarquux hok implementation that takes a struct timeval * argument.</para> 
     77 *   <para>A foobarquux hook implementation that takes a struct timeval * argument.</para> 
    7878 *   <programlisting> 
    7979 *     NOIT_HOOK_IMPL(foobarquux, (struct timeval *now), 
     
    100100 *     struct timeval now; 
    101101 *     gettimeofday(&now, NULL); 
    102  *     if(NOIT_HOOK_CONTINUE == 
    103  *        foobarquux_hook_invoke(&now)) 
     102 *     if(NOIT_HOOK_CONTINUE == foobarquux_hook_invoke(&now)) 
    104103 *       foobarquux_work(); 
    105104 *   ]]></programlisting> 
    106105 *   </example> 
    107106 *   <para>If the hook should not conditionally cause or prevent code 
    108  *   to run, the invoke function's return value can be ignored.</para> 
     107 *   to run, the invoke function's return value should be ignored.</para> 
    109108 *   <para>In order to register a function that allows the above execution 
    110109 *   on every other subsequent execution one would provide the following: