lkml.org 
[lkml]   [1999]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: deadlock avoidance?
    Date
    Wednesday, December 08, 1999 12:18 AM
    Davide Libenzi <dlibenzi@maticad.it> wrote :
    > #define nested_lock(lock, flags) \
    > if (lock->pid == getpid()) { \
    > ++lock->count; \
    > } else { \
    > spin_lock_irqsave(&lock->lock, flags); \

    + ++lock->count; \ <<<<<<<<<<<<<<<<<<<<<<

    > lock->pid = getpid(); \
    > }
    >
    > #define nested_unlock(lock, flags) \
    > if (--lock->count == 0) { \
    > lock->pid = 0; \
    > spin_unlock_irqrestore(&lock->lock, flags); \
    > }
    >

    Ops !

    --
    "Debian, the Freedom in Freedom."



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

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