lkml.org 
[lkml]   [2009]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] module: kzalloc mod->ref

    * Rusty Russell <rusty@rustcorp.com.au> wrote:

    > @@ -344,8 +339,11 @@ struct module
    > /* Destruction function. */
    > void (*exit)(void);
    >
    > - /* Reference counts */
    > - struct module_ref ref[NR_CPUS];
    > +#ifdef CONFIG_SMP
    > + char *refptr;
    > +#else
    > + local_t ref;
    > +#endif

    hm, that construct looks rather ugly. Is there no way to provide a clean
    data type and APIs for this that just work symmetrically on both SMP and
    UP?

    Ingo


    \
     
     \ /
      Last update: 2009-01-27 14:19    [W:0.047 / U:1.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site