[lkml]   [2003]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH][ATM] cli() for net/atm/lec.c
    On Thu, Feb 20, 2003 at 07:06:13PM +0000, Christoph Hellwig wrote:
    > > extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent);
    > > +static spinlock_t lec_arp_spinlock = SPIN_LOCK_UNLOCKED;
    > > +static unsigned long lec_arp_flags;
    > >
    > > +#define LEC_ARP_LOCK() spin_lock_irqsave(&lec_arp_spinlock, lec_arp_flags);
    > > +#define LEC_ARP_UNLOCK() spin_unlock_irqrestore(&lec_arp_spinlock, lec_arp_flags);
    > I don't think this is a good idea - use the spin_lock calls directly and
    > always use flags on the stack.

    Good spotting, though I would be more direct :)

    Simon sez, "Don't do that"

    1) use 'unsigned long flags' on the stack
    2) do _not_ pass this variable between functions


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:33    [W:0.023 / U:51.688 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site