SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: zhuizhuhaomeng on May 30, 2010, 08:11:56 am

Title: How should I do with __read_mostly in linux kernel?
Post by: zhuizhuhaomeng on May 30, 2010, 08:11:56 am
just like the code below,the slickedit can not parse the code correct,so the color will not show right.
And goto-definition will not work well.
Is there someone can solve the problem ?


static struct kmem_cache *skbuff_head_cache __read_mostly;
static struct kmem_cache *skbuff_fclone_cache __read_mostly;



        struct kmem_cache *cache;
        struct skb_shared_info *shinfo;
        struct sk_buff *skb;
        u8 *data;

        cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;

        /* Get the HEAD */
        skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
        if (!skb)
                goto out;

Title: Re: How should I do with __read_mostly in linux kernel?
Post by: hs2 on May 30, 2010, 10:38:59 am
Try to hide non-std. compiler extensions from tagging using the 'C/C++ preprocessing' config.
e.g. add '#define __read_mostly' and update tag DB.
HS2
PS: Use png/jpg/etc. instead of bloated bmp for images ;)
Title: Re: How should I do with __read_mostly in linux kernel?
Post by: zhuizhuhaomeng on May 31, 2010, 02:37:29 am
Thank you very much!