Patrick Mochel <[email protected]> writes:
> +void klist_del(struct klist_node * n)
> +{
> + struct klist * k = n->n_klist;
> +
> + spin_lock(&k->k_lock);
> + klist_dec_and_del(n);
> + spin_unlock(&k->k_lock);
> +}
Can't we use atomic_dec_and_lock()?
[...]
> +void klist_remove(struct klist_node * n)
> +{
> + spin_lock(&n->n_klist->k_lock);
> + klist_dec_and_del(n);
> + spin_unlock(&n->n_klist->k_lock);
> + wait_for_completion(&n->n_removed);
> +}
Why isn't those going into drivers/base/? Personally, klist seems
drivers/base stuff rather than generic stuff...
--
OGAWA Hirofumi <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]