[lkml]   [2005]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 05/15] Generic Mutex Subsystem, mutex-core.patch

    * Oleg Nesterov <> wrote:

    > > + spin_lock(&lock->wait_lock);
    > > + __add_waiter(lock, waiter, ti, task __IP__);
    > > + set_task_state(task, task_state);
    > I can't understand why __mutex_lock_common() does xchg() after adding
    > the waiter to the ->wait_list. We are holding ->wait_lock, we can't
    > race with __mutex_unlock_nonatomic() - it calls wake_up() and sets
    > ->count under this spinlock.

    we must make sure that the drop has not been dropped meanwhile, on the
    way in, between the fastpath-unlock atomic op, and the xchg() here.

    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-12-21 17:01    [W:0.021 / U:3.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site