lkml.org 
[lkml]   [2000]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: test6-lowlatency-D1 results: 50msec + hangs ....
    On Sat, Aug 05, 2000 at 05:52:26PM -0700, David S. Miller wrote:
    > Date: Sun, 6 Aug 2000 01:43:04 +0100
    > From: Philipp Rumpf <prumpf@parcelfarce.linux.theplanet.co.uk>
    >
    > That's bogus on UP (spin_is_locked always returns 0).
    >
    > I think it would be reasonably nice to have something like
    >
    > spin_lock_held(spinlock_t *lock);
    >
    > that returns 1 for UP and spin_is_locked(lock) for SMP - basically
    >
    > Really, whatever you name it, the question of a lock being held or not
    > on UP has zero meaning. There is no correct return value, period.

    Uhm, I disagree. "Am I holding this lock" is always true on UP. "Is
    someone else holding this lock" is always false. "Am I holding this lock"
    also isn't the same as spin_is_locked on SMP since you want to look at
    who's holding it when debugging is enabled. Same goes for "Is someone
    else holding this lock".

    > No matter what constant answer you decide to give on UP it will always
    > be incorrect. I know, because there were old bits of assertions in

    You're right. But no-one actually cares about whether a lock is held -
    they care about whether they're holding it or someone else is holding it
    or no-one's holding it.

    Philipp

    -
    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:58    [W:0.022 / U:215.532 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site