lkml.org 
[lkml]   [1998]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Interrupts with SMP defined
       Date: 	Wed, 4 Mar 1998 17:03:17 -0500 (EST)
    From: Chris Loveland <cwl@fclinux-e.iol.unh.edu>

    spin_lock_irqsave(&some_lock, flags1);
    /* interupts now off */
    save_flags(flags2);
    cli();
    restore_flags(flags2);
    /* interupts are back on, bad stuff happens */
    spin_unlock_irqrestore(&some_lock, flags1);

    Don't do that.... it's just as bad (although not the same problem)
    as going:

    spinlock_t a;
    spinlock_t b;
    spin_lock(&a);
    spin_lock(&b);
    spin_unlock(&a);
    spin_unlock(&b);

    Later,
    David S. Miller
    davem@dm.cobaltmicro.com

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

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